Skip to main content
Glama
udaykumar-dhokia

postgresql-mcp

execute_sql

Run any SQL query on PostgreSQL to retrieve, insert, update, or delete data. Grants full database access, so use with caution.

Instructions

Execute any SQL query. WARNING: Full database access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the behavioral disclosure burden. 'WARNING: Full database access' meaningfully signals broad read/write/destructive capability. However, it does not describe return behavior, transaction commit semantics, or whether queries execute immediately with no confirmation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences deliver the core purpose and the key warning with no wasted words. The front-loaded action and warning make the definition efficient and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a potentially destructive tool with no annotations and no output schema, this is under-specified. It lacks usage routing, side-effect expectations, and return format details. The warning is helpful but insufficient for an agent to fully anticipate the consequences of invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds little beyond restating that the query is arbitrary SQL. It provides no syntax guidance, examples, or constraints such as whether multiple statements are allowed. The single 'query' parameter is self-explanatory, but the description does not compensate for the missing schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the action and resource: execute any SQL query. The phrase 'any SQL query' signals that this is a general-purpose tool rather than a table-specific one, though it does not explicitly name or contrast the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus the sibling tools like list_tables or describe_table. The warning implies the tool is powerful and should be used carefully, but it does not state when to prefer it or when to avoid it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools