fix: correct input schema property name in getTools method (#5095)

This commit is contained in:
Theresa
2025-06-26 12:20:30 +08:00
committed by GitHub
parent b3562e9d0f
commit 626055836f

View File

@@ -78,13 +78,15 @@ export class MCPClient {
const tools = response.tools.map((tool) => ({ const tools = response.tools.map((tool) => ({
name: tool.name, name: tool.name,
description: tool.description || '', description: tool.description || '',
input_schema: tool.inputSchema ? { inputSchema: tool.inputSchema
...tool.inputSchema, ? {
properties: tool.inputSchema.properties || {} ...tool.inputSchema,
} : { properties: tool.inputSchema.properties || {}
type: 'object', }
properties: {} : {
} type: 'object',
properties: {}
}
})); }));
// @ts-ignore // @ts-ignore