Skip to main content
Glama
bysonte

postgres-mcp-server

by bysonte

execute_dml_ddl_dcl_tcl

Execute SQL write statements (DML, DDL, DCL, TCL) on PostgreSQL only when write mode is enabled, leaving the transaction pending for explicit commit or rollback.

Instructions

Ejecuta escritura SQL solo si POSTGRES_ENABLE_WRITE=true. Deja la transacción pendiente hasta commit o rollback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSentencia INSERT/UPDATE/DELETE/MERGE/COPY
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses two key behaviors: the write only executes when POSTGRES_ENABLE_WRITE=true, and the transaction is left pending until commit/rollback. This adds context beyond the schema but doesn't cover error handling or what happens if the flag is false.

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 two short sentences, front-loading the primary action and adding two crucial constraints (environment variable and transaction state) without extraneous information.

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?

The tool is simple with one parameter, and the description covers the main behavioral constraints. It could be more complete by clarifying that DDL/DCL/TCL statements are not supported despite the tool name, and what happens when POSTGRES_ENABLE_WRITE is false, but the essential information is present.

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?

The schema already provides 100% coverage for the 'sql' parameter, listing allowed statement types (INSERT/UPDATE/DELETE/MERGE/COPY). The description does not add additional parameter details, so the baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool executes SQL write operations and includes the critical condition POSTGRES_ENABLE_WRITE=true and transaction behavior, distinguishing it from siblings like execute_query (reads) and execute_commit/rollback (transaction control). However, the broad name suggests DDL/DCL/TCL support, while the schema restricts to DML writes, creating slight ambiguity.

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

Usage Guidelines3/5

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

The description provides a clear condition for use (POSTGRES_ENABLE_WRITE=true) and implies the need for a subsequent commit/rollback, but it does not explicitly compare to alternatives or state that it is for write statements only. Sibling names are available but not referenced.

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

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