Skip to main content
Glama

run_sql

Query an accounts-payable ledger with read-only SELECT statements to retrieve invoice, payment, and reconciliation data safely, returning columns, rows, and truncation status.

Instructions

Run a read-only SELECT (or WITH ... SELECT) against the ledger.

Returns columns, rows and whether the result was truncated. Write statements, multiple statements and PRAGMAs are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the operation read-only and enumerates what is rejected (write statements, multiple statements, PRAGMAs), which is exactly the safety profile an agent needs before invoking. It also notes truncation is reported. It stops short of timeout, rate-limit, or cost behavior, so it is strong but not exhaustive.

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?

Two tight sentences, with the core operation front-loaded and the constraint/rejection list following. No filler, no restatement of the name.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the query constraints are covered. However, for a two-parameter tool with zero schema description coverage, the omission of the 'limit' parameter leaves a real gap an agent must guess at.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It partially covers 'query' by constraining the accepted statement forms, but the second parameter 'limit' (default 50) is never mentioned, so an agent gets no guidance on row capping or how limit interacts with truncation.

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 and resource ('Run a read-only SELECT ... against the ledger') and pins down the exact accepted grammar (SELECT or WITH ... SELECT). This is clearly distinguishable from the narrower siblings vendor_balances, reconcile_ledger, and explain_exception, which cover specific analytical tasks rather than arbitrary queries.

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?

The 'read-only SELECT' framing implies this is the ad-hoc query escape hatch, but the description never says when to prefer it over vendor_balances, reconcile_ledger, or explain_exception. Usage is inferable rather than stated, and no exclusions or alternatives are given.

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