Skip to main content
Glama
adaptive-pg-mcp (PostgreSQL)

adaptive-pg-mcp (PostgreSQL)

execute_ddl

Destructive

Run one DDL statement such as CREATE, ALTER, DROP, or TRUNCATE. Row-only or large-change statements are rolled back; returns up to 1,000 rows and times out after 30s.

Instructions

Runs one DDL statement, such as CREATE, ALTER or DROP, or a TRUNCATE. Rolls back a statement that only works on rows, which needs execute_sql, and one that changes more than 100 rows in tables that existed before it. Returns at most 1,000 rows. Times out after 30s.

Input Schema

NameRequiredDescriptionDefault
sqlYesOne SQL statement, sent to Postgres unchanged. More than one statement is refused.
databaseYesThe database to run on.

Output Schema

NameRequiredDescriptionDefault
rowsYesThe result rows, each an array in column order.
columnsYesThe result columns, in order.
rowsAffectedYesThe number of rows changed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description goes well beyond them: rollback semantics for disallowed statements, a 100-row mutation ceiling applied only to pre-existing tables, a 1,000-row return cap, and a 30s timeout. These are exactly the operational limits an agent needs before firing a destructive call.

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?

Four short sentences, front-loaded with the operation type before limits and caveats, with no filler. The rollback sentences are slightly convoluted, especially 'one that changes more than 100 rows in tables that existed before it', which takes a reread to parse.

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

Completeness5/5

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

An output schema exists, so return values need no explanation; the description instead covers the operational envelope (timeout, row caps, rollback guards) that determines whether the call succeeds. For a destructive two-parameter tool, nothing critical is missing.

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 coverage is 100%, so the single-statement constraint, the database enum, and the 'sent to Postgres unchanged' note are all already in the schema. The description adds no parameter-specific detail, so the baseline 3 applies.

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

Purpose5/5

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

Names the exact operation family ('one DDL statement') and enumerates concrete examples (CREATE, ALTER, DROP, TRUNCATE), which immediately separates it from row-oriented siblings. An agent can tell this is for schema changes, not data changes, without opening the schema.

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

Usage Guidelines5/5

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

Explicitly routes row-only statements to execute_sql and states the two rejection conditions (row-only statements, mutations exceeding 100 rows in pre-existing tables). This is real when-to-use/when-not-to-use guidance tied to a named alternative.

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