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. By default the whole query (every statement in it) runs on one connection in one transaction that Floot opens and commits: if any statement fails, or the query times out before its COMMIT, nothing is applied. Leave BEGIN/COMMIT/ROLLBACK out of the query — a COMMIT or ROLLBACK inside it ends that transaction early, so a later failure no longer undoes what came before. Set no_transaction for statements that cannot run inside a transaction block (VACUUM, CREATE INDEX CONCURRENTLY, …); each statement then applies as it finishes. Queries are stopped after 75 seconds either way; split a longer migration into several calls. A disconnect does not stop a call that has started: if you got no result, check the schema before running it again.

Input 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.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, yet the description adds substantial context beyond them: the client-level user approval flow for destructive statements, the auto-commit/rollback transaction model (all-or-nothing unless no_transaction), the 75-second cap, and the caveat that a disconnect does not stop an in-flight call. 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.

Conciseness5/5

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

The description is long but front-loaded with purpose and every clause carries operational weight: transaction semantics, approval flow, schema re-pull, timeout, and retry-after-disconnect. No filler or repetition of the title; length is justified by the tool's complexity.

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?

For a destructive, transaction-sensitive write tool with no output schema, the description covers the full decision surface: which database, how to handle non-transactional statements, the failure/rollback model, timeout limits, and what to do if a result is not received. Nothing an agent needs to call it safely is missing.

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 only 25% (only no_transaction is documented in the schema), so the description must compensate. It meaningfully clarifies two params — `database` ('Pass only if the project has more than one') and `no_transaction` (statements Postgres rejects inside a transaction) — while `query` and `projectId` remain undocumented but are largely self-evident.

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 names a specific verb (run a WRITE SQL statement) and resource (the project's Postgres database, Floot-managed or user-connected), and enumerates the statement classes it covers (CREATE/ALTER, INSERT/UPDATE/DELETE, DROP, migrations). The 'WRITE' emphasis plus the title 'Execute SQL (Writes)' cleanly separates it from the read-oriented 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?

Explicit when/when-not guidance: pass `database` only when the project has more than one, set `no_transaction` for VACUUM/CREATE INDEX CONCURRENTLY, leave BEGIN/COMMIT/ROLLBACK out, and split long migrations into several calls. It also routes the agent away from a sibling by stating a schema-changing statement auto re-pulls the schema so 'no separate pull_database_schema call' is needed.

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