Skip to main content
Glama

Run database write

postgres_execute
Destructive

Run a SINGLE mutating statement (INSERT/UPDATE/DELETE or DDL) against a relational database connection that YOU OWN and that has 'Allow writes' enabled. Shared connections are read-only and are rejected. Accepts one statement in the connection engine's native SQL; multiple statements are rejected. Use postgres_query for read-only queries.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connection": "<connection>",
      "sql": "<sql>"
    },
    "name": "postgres_execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesA single mutating statement (INSERT/UPDATE/DELETE or DDL) in the connection engine's native SQL
connectionYesName of the connection to run the write against

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the safety profile is known. The description adds genuine context beyond that: single-statement enforcement, multi-statement rejection, and the ownership/'Allow writes' prerequisite behind the rejection. It stops short of stating transaction behavior, rollback expectations, or how failures surface.

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 short sentences, each carrying a distinct constraint: statement cardinality, connection ownership, SQL dialect, and the sibling alternative. The cardinality rule is front-loaded in caps and nothing is redundant padding.

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 two-parameter write tool with full schema coverage and no output schema, the description covers the critical preconditions and rejection cases well. The remaining gap is what comes back on success or failure (rows affected, error shape), which matters slightly more here because there is no output schema to fall back on.

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 both parameters are already documented in the schema, and the description largely restates the 'single mutating statement in native SQL' wording. It adds the useful constraint that multiple statements are rejected, but nothing about connection naming or engine-specific syntax beyond what the schema says. 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?

States a specific verb and resource ('Run a SINGLE mutating statement ... against a relational database connection') plus the exact statement classes (INSERT/UPDATE/DELETE or DDL). It also names the sibling it replaces (postgres_query for reads) and the sibling family (postgres_list_connections, postgres_schema), so an agent can route without opening schemas.

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 gives the when-not condition: shared connections are read-only and get rejected, and the connection must be one you own with 'Allow writes' enabled. It also names the alternative tool for the read-only case, which is the exact routing decision an agent needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources