Skip to main content
Glama

run_sql

Execute a single read-only SQL SELECT against a SQLite database and receive the resulting rows as plain text. Use it to inspect and verify data without modifying the database.

Instructions

Run one read-only SELECT directly and return the rows as text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the safety burden and it does well by stating 'read-only' and 'one SELECT,' ruling out writes and multi-statement scripts. It also discloses the output format as text, though it does not mention error behavior or result-size limits.

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 entire description is one compact, front-loaded sentence with no filler. Every word earns its place by adding a key constraint or behavior.

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 tool with a single parameter and an output schema already available, the description covers purpose, safety, statement count, and return format. Nothing essential is missing for an agent to invoke it correctly.

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?

The schema only provides a bare 'sql' string with 0% coverage, so the description meaningfully compensates by specifying that the parameter must be a read-only SELECT statement and only one statement. It could add syntax or formatting details, but the core meaning is clear.

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 precise resource ('one read-only SELECT'), and the output behavior ('return the rows as text'). This clearly distinguishes it from the siblings ask_database and describe_schema, which are not direct raw SQL execution.

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?

The word 'directly' conveys that this is the tool for raw SQL execution rather than a natural-language interface like ask_database. However, it does not explicitly name alternatives or state when not to use it, so guidance is clear but not fully explicit.

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