An MCP server that dynamically exposes REST API endpoints from a Spring Boot application as MCP tools by parsing OpenAPI specifications
Single tool 'dynamic_rest_api_tools' has critical definition gaps. Tool name is generic and does not follow verb_noun pattern (should be 'call_rest_endpoint' or similar). Description is present but vague, it describes the mechanism (dynamically generated from OpenAPI) rather than what the LLM should do with it. Input schema is declared as a string ('JSON.toJSONString(schema)') rather than a proper structured JSON Schema object, making it unparseable by MCP clients. No output schema is documented. No parameter descriptions beyond the generic 'Input schema is dynamically determined'. Error handling returns raw exception messages ('Error: ' + e.getMessage()) without recovery guidance. The tool conflates multiple concerns: endpoint discovery, parameter marshalling, invocation, and result serialization.
Dynamically generated tools from Spring Boot REST API endpoints. Each endpoint is converted to an MCP tool with the tool name derived from the controller class and method name, description from OpenAPI tags and operation description, and input schema from the request body schema.
Input schema is serialized as a JSON string, not a structured JSON Schema object. MCP clients cannot parse or validate it. Line: JSON.toJSONString(schema) in RestApiToolProvider.java.
Tool name 'dynamic_rest_api_tools' is generic and does not start with an action verb. Should be 'call_rest_endpoint', 'invoke_api_method', or similar to signal intent to the LLM.
No output schema documented. LLMs cannot predict what fields the tool returns, breaking downstream tool chaining and forcing exploratory calls.
Error responses return raw exception messages ('Error: ' + e.getMessage()) without recovery guidance. LLM cannot determine if error is retryable, user-fixable, or fatal.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 22 | <=2025-11-25 | v2 |
Tool description focuses on implementation mechanism (dynamically generated from OpenAPI) rather than when/why an LLM should call it. Lacks WHAT, WHEN, and RETURN guidance.