Skip to main content
Glama

Execute SQL (Writes)

execute_sql
Destructive

Run a WRITE SQL statement against the project's Postgres database — 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.

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description aligns and enriches these by detailing the user-approval step, the automatic schema-helper re-pull, transaction default behavior, and timeout. It also explains which statements require no_transaction. No contradiction—the description extends the annotation-driven behavioral model substantially.

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 longer but every sentence adds value: purpose, approval, schema re-pull, database condition, transaction, timeout. It is front-loaded with the core purpose and flows logically through invocation details. No filler or 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?

Covers the essential context: what the tool does, when to use it, parameters, transaction behavior, timeout, and the schema re-pull effect. It does not specify the return format for non-schema statements (e.g., affected rows or result set), and error handling is absent. Given the existence of a sibling query_database and the write intent, these gaps are minor but still leave some ambiguity for an agent.

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%, so the description must compensate. It explains `no_transaction` (required for VACUUM, INDEX CONCURRENTLY) and `database` (only when multiple databases exist), and implies `query` is the SQL statement. `projectId` is not explicitly described but is conventional and the overall semantics are clear enough. A strong but not perfect compensation for low schema documentation.

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 opens with 'Run a WRITE SQL statement against the project's Postgres database' and lists specific operations (CREATE/ALTER TABLE, INSERT, UPDATE, DELETE, DROP, migrations). This clearly distinguishes it from the read-only sibling query_database and the schema-only pull_database_schema, which is also referenced explicitly.

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?

Provides explicit when-to-use guidance: approval flow for destructive statements, auto schema re-pull removing the need for a separate pull_database_schema call, the condition for passing `database`, and when to set `no_transaction`. It also notes the 90-second timeout. These instructions leave no ambiguity about invocation context.

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.

TDQS

A3.6/5.0
Disambiguation4/5

Tools are mostly distinct, but there is some overlap among file-modifying tools (edit_file, write_file, apply_patch) and between run_code_in_vm and run_code_in_browser. Detailed descriptions and clearly scoped use cases help agents select correctly.

Naming Consistency4/5

Most tools follow a verb_noun snake_case pattern (create_project, list_files, execute_sql), but a few deviate (apply_patch, card_upload_asset, run_code_in_vm). Overall readable and predictable, with only minor inconsistencies.

Tool Count2/5

With 46 tools, the server exceeds the typical well-scoped range and approaches the extreme threshold. While the broad scope of a full development platform justifies many tools, this count may overwhelm agents and increase misselection risk.

Completeness4/5

The tool surface covers the full development lifecycle: project creation, file operations, database management, resource provisioning, deployment, testing, and debugging. Minor gaps exist (e.g., no delete_project or checkpoint management), but core workflows are well-supported.

Resources