Single read-only query tool with basic but incomplete documentation. Tool name lacks action verb clarity ('query_database' is vague about read-only constraint). Input schema is present but minimal. Output is unstructured text (table-formatted string) rather than structured JSON. No pagination support. Error messages are somewhat actionable but lack recovery guidance. Parameter description exists but is brief (67 chars). Resource 'list_tables' is present but not evaluated as a tool. Overall definition quality is below median due to lack of structured output, minimal descriptions, and no error recovery patterns.
Execute a read-only SQL query on the database Args: query: SQL query to execute (must be SELECT, SHOW, DESCRIBE, DESC, EXPLAIN)
Tool name 'query_database' is generic and does not clearly signal read-only constraint. Name should be 'execute_read_query' or 'query_database_readonly' to signal safety.
Output is unstructured plaintext (formatted table string) instead of structured JSON. LLMs cannot reliably parse or extract fields from text tables. Should return {columns: [], rows: []} structure.
No output schema documented. Tool description does not state what the return value is or what structure to expect. Tool description must specify return type and format.
Parameter 'query' description is only 67 characters and lacks format constraints. Should specify: max length, allowed keywords (SELECT, SHOW, DESCRIBE, DESC, EXPLAIN), and example format. Current description relies on name inference.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 37 | - | v1 |
No pagination support. Tool can return unlimited rows from 'SELECT *' queries, which would exhaust LLM context. Must accept limit and offset parameters and document result cap.
Error messages ('Error executing query...', 'Error: Only read-only...') provide no recovery guidance. Should tell LLM: 'Query rejected: only SELECT, SHOW, DESCRIBE, DESC, EXPLAIN allowed. Rewrite query or use a different tool.'
No input validation with actionable feedback. If query contains 'DROP' or 'DELETE', error message should echo the invalid keyword and list allowed operations, not generic rejection.