LearnNewsExamplesServices
Frontmatter
id7487
titleEnhance Tools List with OpenAPI Schema
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 14, 2025, 2:23 PM
updatedAtOct 14, 2025, 2:30 PM
githubUrlhttps://github.com/neomjs/neo/issues/7487
authortobiu
commentsCount1
parentIssue7477
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 14, 2025, 2:30 PM

Enhance Tools List with OpenAPI Schema

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 14, 2025, 2:23 PM

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

  1. 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.
  2. 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.
  3. 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.
  4. The outputSchema (JSON Schema object) is optionally included in the tool definition if available in the OpenAPI response.
tobiu assigned to @tobiu on Oct 14, 2025, 2:23 PM
tobiu added the enhancement label on Oct 14, 2025, 2:23 PM
tobiu added the ai label on Oct 14, 2025, 2:23 PM
tobiu added parent issue #7477 on Oct 14, 2025, 2:23 PM
tobiu referenced in commit d2af666 - "Enhance Tools List with OpenAPI Schema #7487" on Oct 14, 2025, 2:26 PM
tobiu referenced in commit d5fe8f3 - "#7487 buildOutputSchema()" on Oct 14, 2025, 2:29 PM
tobiu
tobiu Oct 14, 2025, 2:30 PM
Image
tobiu closed this issue on Oct 14, 2025, 2:30 PM
tobiu cross-referenced by #7403 on Oct 14, 2025, 5:02 PM