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,10 +78,12 @@ 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, ...tool.inputSchema,
properties: tool.inputSchema.properties || {} properties: tool.inputSchema.properties || {}
} : { }
: {
type: 'object', type: 'object',
properties: {} properties: {}
} }