Skip to main content
Glama
gokiwitech

pgwarden-mcp

by gokiwitech

execute_sql

Destructive

Run SQL queries on production Postgres databases while enforcing deny-by-default policies, PII masking, and row limits to prevent accidental damage.

Instructions

Execute any SQL query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoSQL to runall
databaseNoOptional. Alias of the configured database to query. Omit it when the server has only one database configured. When several are configured this parameter is required - call list_databases first to learn the valid aliases.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior2/5

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

The annotation destructiveHint=true already signals that this tool can be destructive. The description adds no further behavioral context, such as whether arbitrary DDL/DML is supported, what changes are irreversible, or what permissions are needed. It does not contradict the annotation, but it does not enrich it either.

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

Conciseness3/5

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

The description is a single short sentence, which is front-loaded and not verbose. However, it is overly generic and lacks useful detail, making it under-specified rather than appropriately concise. It does not waste words, but it also does not earn its place with substantive information.

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

Completeness3/5

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

With an output schema and annotations present, the description does not need to explain return values or destructive risk. However, given that this is an arbitrary SQL execution tool with significant power, additional context about supported SQL dialects or constraints would be beneficial. The current description is minimally adequate but not comprehensive.

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?

Schema description coverage is 100%, with detailed descriptions for both `sql` and `database` parameters, including the optionality and alias behavior. The description 'Execute any SQL query' adds no parameter-specific meaning, so the baseline 3 is appropriate.

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

Purpose3/5

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

The description states a clear verb and object: 'Execute' a 'SQL query'. However, the qualifier 'any' is vague and doesn't clarify whether this is for reads, writes, or both, nor does it explicitly differentiate from sibling tools like explain_query or analyze_query_indexes, which also involve SQL-related operations.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no warnings about destructive effects. While the schema mentions calling list_databases first when multiple databases are configured, the description itself omits this entirely, leaving usage entirely to inference.

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