Skip to main content
Glama

execute

Execute write SQL statements (INSERT, UPDATE, DELETE) to modify PostgreSQL database data. Use with caution as this tool directly changes database content.

Instructions

Execute a write SQL statement (INSERT, UPDATE, DELETE).

WARNING: This tool modifies data. Use with caution.
Only available if ALLOW_WRITE_OPERATIONS=true is set.

Args:
    sql: SQL statement to execute
    
Returns:
    Execution result with affected row count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing critical behavioral traits: it's a data-modifying operation ('modifies data'), includes a caution warning, and specifies an environmental prerequisite. It could improve by mentioning transaction behavior or error handling.

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 efficiently structured with purpose first, warnings and prerequisites clearly highlighted, and parameter/return sections separated. Every sentence adds value with no redundancy.

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 write operation with no annotations and no output schema, the description is quite complete—covering purpose, warnings, prerequisites, parameters, and returns. It could be slightly improved by detailing the return format beyond 'affected row count'.

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?

Schema description coverage is 0%, but the description compensates by explaining the 'sql' parameter as 'SQL statement to execute' and specifying it must be a write statement (INSERT, UPDATE, DELETE), adding meaningful context beyond the bare 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?

The description clearly states the tool's purpose with specific verbs ('execute a write SQL statement') and resource types (INSERT, UPDATE, DELETE), and distinguishes it from sibling tools that are primarily read operations like query, describe_table, etc.

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?

Explicit guidance is provided on when to use ('execute a write SQL statement') and when not to use ('Only available if ALLOW_WRITE_OPERATIONS=true is set'), with clear alternatives implied through sibling tool names like 'query' for read operations.

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/JaviMaligno/postgres_mcp'

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