fix: update input schema structure in getTools method (#5089)

* fix: update input schema structure in getTools method

* Update mcp.ts

* Update mcp.ts

---------

Co-authored-by: Archer <545436317@qq.com>
This commit is contained in:
Theresa
2025-06-25 19:45:13 +08:00
committed by GitHub
parent 5153ffad59
commit f31752ccd0

View File

@@ -78,7 +78,10 @@ export class MCPClient {
const tools = response.tools.map((tool) => ({
name: tool.name,
description: tool.description || '',
inputSchema: tool.inputSchema || {
input_schema: tool.inputSchema ? {
...tool.inputSchema,
properties: tool.inputSchema.properties || {}
} : {
type: 'object',
properties: {}
}