fix: update input schema structure in getTools method (#5089)
Some checks are pending
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run

* 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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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: {}
}