A Spring Boot-based MCP server that provides read-only SQL query execution and database schema introspection for PostgreSQL databases.
Single tool 'query' has a clear name and reasonable description (127 chars), but critical gaps undermine quality. Input schema is present with three parameters (sql, pageNumber, pageSize), all with descriptions. However, the tool enforces restrictive constraints (WHERE clause required, SELECT * prohibited, max pageSize=50) that are documented in the description but not formalized as schema constraints or enums. Output schema is completely undocumented, the tool returns a String (likely JSON), but the LLM has no visibility into the structure of results. Error handling is basic (IllegalArgumentException for missing WHERE clause) with no recovery guidance. The tool lacks idempotency hints, read-only annotations, and pagination metadata (total count, next_cursor). Parameter descriptions are adequate but lack format/range specifications beyond the description text.
Executes a read-only SQL query with paging. Requires WHERE clause. prohibits SELECT * and Specify the column names every time, max pageSize=50.
Output schema completely undocumented. Tool returns String but LLM cannot infer result structure (columns, row count, pagination metadata). Violates pattern:tool requirement that output schema be documented.
Input constraints (WHERE clause required, no SELECT *, max pageSize=50) are documented in description text only. Should be formalized as schema validation rules, enums, or pattern constraints so LLM can see them in the schema, not just prose.
No pagination metadata returned. Tool accepts pageNumber and pageSize but response does not include total count, has_more, or next_cursor. LLM cannot determine if more results exist or how to fetch them efficiently.
Error handling lacks recovery guidance. IllegalArgumentException for missing WHERE clause is thrown but error message does not guide LLM on what to do next (e.g., 'Add a WHERE clause to filter results').
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 40 | 2026-07-28+ | v2 |
Tool lacks read-only annotation. Although marked as @Transactional(readOnly=true) in code, no @Tool annotation hint (readOnlyHint) is visible to the MCP protocol layer, so clients cannot determine safety without inspecting source.