LearnNewsExamplesServices
Frontmatter
id7493
titleImplement Dynamic Tool Discovery via OpenAPI
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 15, 2025, 12:44 PM
updatedAtOct 15, 2025, 1:05 PM
githubUrlhttps://github.com/neomjs/neo/issues/7493
authortobiu
commentsCount0
parentIssue7477
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 15, 2025, 1:05 PM

Implement Dynamic Tool Discovery via OpenAPI

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 15, 2025, 12:44 PM

The MCP server must support dynamic tool discovery as described in the protocol specification. A previous refactoring incorrectly implemented a static, hardcoded tool definition within a JavaScript module (tools.mjs), which is contrary to the flexible, API-driven nature of the MCP.

This ticket corrects that architectural error. We will reinstate the use of openapi.yaml as the single, declarative source of truth for tool definitions. The server will parse this file at runtime to build its list of available tools.

Acceptance Criteria

  1. The static tools.mjs module is deleted.
  2. The toolService.mjs is refactored to parse openapi.yaml at startup.
  3. During parsing, operationIds (in camelCase) from the OpenAPI spec will be converted to snake_case to serve as the MCP tool name, following best practices.
  4. The listTools function in toolService.mjs will return the list of tools generated from the OpenAPI spec.
  5. The callTool function will dynamically execute the correct service function based on the parsed tool definitions.
  6. The mcp-stdio.mjs entry point will remain unchanged and will function correctly with the refactored toolService.
tobiu assigned to @tobiu on Oct 15, 2025, 12:44 PM
tobiu added parent issue #7477 on Oct 15, 2025, 12:44 PM
tobiu added the enhancement label on Oct 15, 2025, 12:44 PM
tobiu added the ai label on Oct 15, 2025, 12:44 PM
tobiu referenced in commit 5521758 - "#7493 making callTools => limit optional" on Oct 15, 2025, 1:05 PM
tobiu closed this issue on Oct 15, 2025, 1:05 PM