Skip to main content
Glama

execute_sql

Run SQL statements against a guarded database under your own identity. Dangerous operations are blocked with a reason, and every statement is audited.

Instructions

Execute a SQL statement against the guarded database, under your own identity. Ordinary INSERT/UPDATE/DELETE/ALTER TABLE run and are audited. DROP TABLE, unapproved TRUNCATE, unapproved EXEC, and your own BEGIN/COMMIT/ROLLBACK TRAN statements are blocked before they ever reach the database - if blocked, the reason is returned so you can adjust and retry. A batch containing INSERT/UPDATE/DELETE runs in one transaction that is rolled back if any statement fails; DDL, TRUNCATE and EXEC run as they are and are not rolled back as part of a batch. When the server runs in read-only mode only queries are allowed and every other statement is blocked with a reason.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL statement to execute.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/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 so excellently. It discloses blocked statement types (DROP TABLE, unapproved TRUNCATE, unapproved EXEC, transaction control), transaction rollback semantics for batches, and read-only mode restrictions, even noting that block reasons are returned.

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 front-loaded with the core action and then systematically covers behavioral rules. Every sentence adds distinct, useful information; no filler or repetition is present.

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 complex, security-sensitive SQL execution tool with no output schema, the description is highly complete on constraints and transaction behavior. It does not describe the return format for successful queries (e.g., rows, result sets), which is a minor but notable gap.

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?

Schema coverage is 100%, and the single parameter is documented as 'The SQL statement to execute.' The description adds no further meaning about the parameter's format or syntax beyond what the schema already provides, so the baseline of 3 applies.

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 states a specific verb and resource: 'Execute a SQL statement against the guarded database.' It is unambiguous and distinguishes the tool from any potential generic query tool by noting the 'guarded database' and identity context.

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

Usage Guidelines4/5

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

It clearly explains when certain SQL statements will run or be blocked, and describes read-only mode behavior. However, with no sibling tools, it does not need to name alternatives, but it also does not explicitly frame usage in terms of choosing this tool over others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools