See: https://modelcontextprotocol.io/specification/2025-06-18/server/tools
The current /tools/list endpoint provides only the name and description of available tools. To enable robust client-side integration and dynamic tool generation for the agent, the tool list needs to include the full OpenAPI schema for each tool's parameters and response, as dictated by the Model Context Protocol (MCP) specification.
This enhancement will allow the agent to fully understand how to call each tool, including required arguments, their types, and the expected return format, directly from the /tools/list response.
Acceptance Criteria
- The
toolService.mjs is updated to extract relevant schema information (parameters, requestBody) for each operation from the openapi.yaml and convert it into a single inputSchema (JSON Schema) for each tool.
- The
GET /tools/list endpoint's response for each tool includes:
name (string): The unique identifier for the tool (from operationId).
title (string): A human-readable title for the tool (from summary).
description (string): A detailed description of the tool (from description).
inputSchema (JSON Schema object): A JSON Schema defining the tool's parameters, derived from the OpenAPI operation's parameters and requestBody.
- The
callTool function in toolService.mjs is updated to remove the manual switch statement for argument mapping. It should expect args to conform to the inputSchema and use a more generic method to pass them to the tool.handler.
- The
outputSchema (JSON Schema object) is optionally included in the tool definition if available in the OpenAPI response.
See: https://modelcontextprotocol.io/specification/2025-06-18/server/tools
The current
/tools/listendpoint provides only the name and description of available tools. To enable robust client-side integration and dynamic tool generation for the agent, the tool list needs to include the full OpenAPI schema for each tool's parameters and response, as dictated by the Model Context Protocol (MCP) specification.This enhancement will allow the agent to fully understand how to call each tool, including required arguments, their types, and the expected return format, directly from the
/tools/listresponse.Acceptance Criteria
toolService.mjsis updated to extract relevant schema information (parameters, requestBody) for each operation from theopenapi.yamland convert it into a singleinputSchema(JSON Schema) for each tool.GET /tools/listendpoint's response for each tool includes:name(string): The unique identifier for the tool (fromoperationId).title(string): A human-readable title for the tool (fromsummary).description(string): A detailed description of the tool (fromdescription).inputSchema(JSON Schema object): A JSON Schema defining the tool's parameters, derived from the OpenAPI operation'sparametersandrequestBody.callToolfunction intoolService.mjsis updated to remove the manualswitchstatement for argument mapping. It should expectargsto conform to theinputSchemaand use a more generic method to pass them to thetool.handler.outputSchema(JSON Schema object) is optionally included in the tool definition if available in the OpenAPI response.