Skip to main content
Glama
Teja-sudo

postgres-mcp-server

by Teja-sudo

mutation_dry_run

Dry-run INSERT, UPDATE, or DELETE inside a transaction, capture real results (row counts, errors, before/after data), then roll back to verify mutations safely.

Instructions

Execute INSERT/UPDATE/DELETE in dry-run mode - actually runs the SQL within a transaction, captures REAL results (exact row counts, actual errors, before/after data), then ROLLBACK so nothing persists. More accurate than mutation_preview. Use this to verify mutations will work correctly before committing. Returns detailed PostgreSQL error info (code, constraint, hint) on failure. Optionally use server/database/schema params for one-time execution on a different server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe INSERT, UPDATE, or DELETE statement to dry-run
sampleSizeNoNumber of sample rows to return (default: 10, max: 20)
serverNoOne-time server override. Execute on this server without changing main connection.
databaseNoOne-time database override. Uses this database for execution.
schemaNoOne-time schema override. Sets search_path for this execution only.
Behavior5/5

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

Since no annotations are provided, the description fully bears the disclosure burden. It thoroughly explains the transactional behavior, rollback, result details, error info, and optional overrides, leaving no ambiguity.

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?

The description is compact yet comprehensive, with no superfluous words. It front-loads the core function and efficiently conveys all necessary details.

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

Completeness4/5

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

Given the complexity (5 parameters, no output schema), the description covers behavior, error information, and optional overrides adequately. It hints at the output format (row counts, errors, before/after data) but lacks a structured return description, though acceptable.

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

Parameters4/5

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

With 100% schema coverage, baseline is 3. The description adds value by explaining the one-time execution nature of server/database/schema params and specifying the default and max for sampleSize, going beyond the schema.

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?

Description clearly states the tool executes INSERT/UPDATE/DELETE in dry-run mode, runs SQL in a transaction, captures real results, and rolls back. It distinguishes itself from mutation_preview, making the purpose unambiguous.

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

Usage Guidelines4/5

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

Explicitly advises to use this tool to verify mutations before committing and notes it is more accurate than mutation_preview. However, it does not mention when not to use it or provide alternatives.

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/Teja-sudo/postgres-mcp-server'

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