Skip to main content
Glama
mirenqinggege

postgres-mcp

execute_sql

Destructive

Execute SQL queries on a PostgreSQL database to retrieve, modify, or manage data.

Instructions

Execute any SQL query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoSQL to runall

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

The description adds no behavioral information beyond the annotations' destructiveHint: true. It does not disclose potential side effects, timeout limits, or that it can modify or delete data. The annotation bears the entire burden, and the description fails to elaborate.

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

Conciseness4/5

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

The description is extremely concise (4 words), making it easy to read and parse. However, it lacks structure and could benefit from a sentence about return values or limitations. The brevity is a trade-off.

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?

Given the tool's complexity (executing arbitrary SQL, destructive), the description is insufficient. It omits return format, execution constraints, security implications, and guidance on using with other tools. The presence of an output schema partly compensates, but the description should still provide operational context.

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

Parameters3/5

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

The input schema covers the single parameter with a description ('SQL to run') and default 'all'. Schema documentation coverage is 100%, so the description adds no additional semantic value. The default 'all' is unclear but not explained in the description.

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?

The description clearly states the tool executes SQL queries, which is its core purpose. However, it does not differentiate from sibling tools like explain_query or analyze_db_health, though those are not execution tools. The verb 'execute' and resource 'SQL query' are clear, but the scope ('any SQL') is broad.

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 on when to use this tool versus alternatives. It doesn't specify prerequisites, whether it's for read-only queries (despite destructiveHint), or when to prefer other tools like execute_sql_file. The description provides no usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mirenqinggege/postgres-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server