Run SQL (replica)
run_sqlRun a read-only SQL query on the core Postgres replica. Tables: users, customers, shipments, api_keys, incident_log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A single SQL statement |
run_sqlRun a read-only SQL query on the core Postgres replica. Tables: users, customers, shipments, api_keys, incident_log.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A single SQL statement |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The read-only claim is consistent with readOnlyHint=true, and the description usefully adds that the target is a replica and which tables exist. However, it says nothing about result row limits, statement timeouts, whether the "single SQL statement" restriction is enforced, or what permissions the caller needs — behavioral details not covered by the single annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences: purpose and target first, table inventory second. Every clause carries information an agent needs, and nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with no output schema, the description covers purpose, execution target, and accessible tables. The main remaining gap is operational behavior — limits, timeouts, and result shape — though the read-only safety profile is already carried by annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With one parameter at 100% schema coverage, the schema already defines the input fully, so the baseline is high. The description adds value by naming the queryable tables, which directly informs how the agent should construct the query string.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ("Run a read-only SQL query") plus the target (core Postgres replica) and enumerates the queryable tables, so the agent knows exactly what it does. It stops short of differentiating from siblings such as search_customers, which overlaps on the customers table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is the tool for arbitrary SELECTs against the listed tables, especially given the list of alternatives (exec_command, read_file, search_customers). There is no explicit statement of when to prefer this over search_customers for customer lookups, nor any warning about when it should not be used.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.