MCP server that enables AI agents to securely query and analyze databases
This MCP server provides 5 read-only database tools with clear naming (all action verbs: execute, get, describe, sample) and reasonable descriptions. All tools have input schemas with type definitions. However, several definition quality gaps limit the score: (1) Parameter descriptions are sparse or generic, 'The SQL query to execute' and 'Schema name (defaults to public/default)' lack actionable detail about format, constraints, or examples. (2) Output schemas are not documented in the provided code; responses are described in tool descriptions but not formalized. (3) Error handling is mentioned for errorReporting=true but no recovery guidance is visible in the tool definitions. (4) Descriptions are brief (13-90 chars), adequate but below the 50-200 char sweet spot for LLM optimization. (5) No pagination or limit enforcement guidance for list/result-returning tools. The strong points: verb-based naming, consistent parameter types (string/number/enum), and security-conscious design (read-only by default, no credentials exposed).
Get detailed information about a specific table including columns, types, constraints, and sample values.
Execute a SQL query against the database. Read-only (SELECT) by default.
Get the database schema including tables, columns, types, and relationships.
Get statistics about tables including row count, size, and index information.
Get sample rows from a table, formatted as a markdown table.
Parameter descriptions lack actionable constraints and format guidance. E.g., 'The SQL query to execute' does not specify: maximum length, allowed statement types (SELECT only), timeout behavior, or what happens on syntax errors. 'The name of the table to describe' does not clarify: case sensitivity, schema qualification, or whether views are supported.
Output schemas are not formally documented in the source code. Tool descriptions mention 'markdown table', 'detailed information', and 'row count', but there is no structured schema definition (JSON Schema or TypeScript interface) visible for responses. LLMs cannot plan downstream tool calls without knowing what fields to expect.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 57 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 45 | - | v1 |
No pagination guidance for result-returning tools. 'execute_query' and 'get_schema' can return large result sets but no documentation on result limits, offset/page parameters, or token cost warnings. Large queries can exhaust context windows.
Error recovery guidance is absent. Tool descriptions do not explain how to handle: SQL syntax errors, permission denied, table not found, connection failures, or timeout scenarios. LLMs have no guidance on what to try next.
Tool descriptions are brief (13-90 chars, target 50-200). While concise is sometimes good, these descriptions lack context on WHEN to use each tool vs. others. E.g., 'describe_table' and 'sample_data' are close in purpose, no guidance on which to call first or when each is preferred.
'limit' parameter in execute_query has type 'number' with no explicit minimum/maximum. Unbounded limits could cause timeouts or memory exhaustion. Should specify valid range (e.g., 1-10000).