Skip to main content
Glama
raphaeljordao86

guarded-postgres-mcp

execute_transaction

Destructive

Run multiple SQL statements in one atomic transaction so all commit or none, with the same guardrails as single writes. Use for backup, delete, and insert operations that must succeed together.

Instructions

Runs several statements inside ONE transaction: all of them commit, or none. Every statement goes through the same checks as execute. The sequence check runs after the last statement, so an INSERT with explicit keys can be followed by its setval. Use it for operations that must be atomic (e.g. backup + delete + insert).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statementsYesSQL statements, one per item (no BEGIN/COMMIT: the server manages the transaction)
descriptionYesDescription of the whole set
i_understandNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotency, and the description adds real behavioral context beyond them: all-or-nothing commit semantics, that the server manages BEGIN/COMMIT, that the sequence check runs after the last statement, and the INSERT-with-explicit-keys-plus-setval ordering implication.

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?

Four compact sentences, front-loaded with the core transactional guarantee, then mechanics, then the use-case example. Every sentence carries distinct information with no repetition.

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?

For a destructive, non-read-only tool with no output schema, the description covers the safety-relevant behavior (atomicity, server-managed transaction, check ordering) well. The one missing piece is any mention of the i_understand confirmation flag, which matters for an irreversible multi-statement tool.

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 67%; the statements param is already documented in the schema (no BEGIN/COMMIT), and the description reinforces its semantics but adds no syntax detail. The i_understand param has no description in either schema or description, leaving its role (confirmation gate) undocumented.

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?

Specific verb and resource with explicit scope: 'Runs several statements inside ONE transaction: all of them commit, or none.' It is immediately distinguishable from the sibling execute (single-statement) by contrasting the all-or-nothing semantics.

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?

Gives a clear when-to-use rule ('operations that must be atomic') plus a concrete example (backup + delete + insert), and implicitly routes single statements to execute via 'the same checks as execute'. No explicit when-not-to-use statement, so not a full 5.

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