Skip to main content
Glama

execute_sql

Read-onlyIdempotent

Run one read-only SQL statement (SELECT, EXPLAIN, or SHOW) through the Multigres gateway; statements are prechecked, limited to allow-listed functions, and run in a rolled-back transaction.

Instructions

Run one read-only SQL statement (SELECT, EXPLAIN of a SELECT, or SHOW) through the Multigres gateway. The statement is checked before it is sent and runs in a read-only transaction that is always rolled back. Functions must be on the allow list.

Input Schema

NameRequiredDescriptionDefault
sqlYesOne SQL statement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that: a pre-flight check before the statement is sent, execution inside a read-only transaction that is always rolled back, and an allow-list requirement for functions. It does not mention row limits, timeouts, or result-size caps, which are meaningful behaviors for a SQL execution tool.

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?

Three short sentences with no filler, and the most decision-relevant facts (read-only, allowed statement types) are front-loaded before the transactional and allow-list details.

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?

With one parameter, full schema coverage, rich annotations, and no output schema to explain, the description covers what an agent needs to construct a valid call. The gap is operational: no statement timeout, row/result cap, or error-behavior guidance, which matters for a tool that can return large result sets.

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 100% and the single parameter is trivially described ('One SQL statement'), so the baseline would be 3. The description earns above baseline because it defines what 'one SQL statement' actually means here: a single statement only, restricted to SELECT/EXPLAIN-of-SELECT/SHOW, with functions drawn from an allow list.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Run one read-only SQL statement') and enumerates the accepted statement forms (SELECT, EXPLAIN of a SELECT, SHOW), so an agent knows exactly what will be executed. It does not name any sibling, even though explain_query and diagnose sit close to this space, so the differentiation is left implicit.

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

Usage Guidelines3/5

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

Usage is constrained rather than directed: the agent learns it may only submit read-only statements and allow-listed functions, which implicitly rules out DDL/DML. However, nothing tells the agent when to call execute_sql versus explain_query, get_top_queries, or the analyze_* siblings, which is the main routing decision it faces.

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