Skip to main content
Glama

Execute SQL (Writes)

execute_sql
Destructive

Run a WRITE SQL statement against the project's Postgres database (the Floot-managed one, or an external Postgres the user connected) — CREATE/ALTER TABLE, INSERT, UPDATE, DELETE, DROP, migrations. Destructive statements are allowed but your MCP client will show the user the SQL and ask them to approve it (they can allow once or for the session). Schema-changing statements (CREATE/ALTER/DROP of tables, types, …) automatically re-pull the typed schema helper and return the updated schema — no separate pull_database_schema call needed. Pass database only if the project has more than one. The query runs in a single transaction by default; set no_transaction for statements that cannot run inside a transaction block (VACUUM, CREATE INDEX CONCURRENTLY, …). Queries are killed after 90 seconds either way.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
databaseNo
projectIdYes
no_transactionNoRun the statement without a wrapping transaction — required for VACUUM, CREATE INDEX CONCURRENTLY, and other statements Postgres rejects inside a transaction block.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, but the description adds critical operational context: the user-approval flow, automatic schema helper re-pull on DDL, default single-transaction wrapping, and a 90-second kill timeout. This is exactly the behavioral detail annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and statement types, then layers operational details. It is dense and somewhat long, but nearly every sentence earns its place by conveying approval, transaction, or timeout behavior.

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

Completeness5/5

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

With no output schema, the description itself closes the loop by explaining that schema-changing statements return the updated typed schema. Transaction handling, timeout, multi-DB selection, and approval are all covered, leaving no significant gaps for a high-risk write tool.

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 coverage is only 25% (just no_transaction documented), so the description must compensate. It explains `database` semantics (needed only for multi-database projects) and reinforces `no_transaction`, though `projectId` and the `query` string itself receive no explicit elaboration.

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+resource ('Run a WRITE SQL statement against the project's Postgres database') and enumerates the statement classes (CREATE/ALTER/INSERT/UPDATE/DELETE/DROP, migrations). The write framing clearly distinguishes it from the read sibling query_database.

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?

Explains exactly when to use it (write statements), when `database` is needed ('only if the project has more than one'), and when `no_transaction` applies (VACUUM, CREATE INDEX CONCURRENTLY). Also tells the agent a separate pull_database_schema call is unnecessary after schema changes.

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