Skip to main content
Glama
KapilXDev
by KapilXDev

run_query

Execute one read-only SQL SELECT to retrieve data from the workbench database, returning column names, rows, and whether results were capped.

Instructions

Run one read-only SELECT against the workbench database.

    Enforced by SQLite itself, not by string matching: the connection is
    opened read-only and an authorizer rejects every non-read action, so
    writes, DDL, PRAGMA and ATTACH all fail. Only one statement per call.

    Returns the column names, the rows, and whether the result was capped.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SQL SELECT statement (SQLite dialect).
max_rowsNoRow cap for this call. Defaults to the server limit.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 meets it thoroughly. It discloses that reads are enforced by SQLite itself through a read-only connection and an authorizer, that writes/DDL/PRAGMA/ATTACH all fail, that only one statement is allowed per call, and that the result includes column names, rows, and a capped indicator. This is exemplary behavioral disclosure.

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 compact and front-loaded with the core purpose in its first sentence. Each subsequent sentence adds meaningful detail (enforcement mechanism, return shape) without fluff. It is appropriately sized for a tool of this complexity.

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 SQL query tool with an output schema present, the description is complete. It covers the execution model (read-only, single statement), the failure modes (non-read actions rejected), and the return shape (columns, rows, capped flag). No critical information is missing for an agent to call it correctly.

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%, so the baseline is 3. The description's 'Only one statement per call' mirrors the sql schema description ('A single read-only SQL SELECT statement'), and max_rows already carries its own default and purpose. The description adds no parameter semantics beyond what the schema already provides.

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 begins with a specific verb+resource: 'Run one read-only SELECT against the workbench database.' This clearly distinguishes it from sibling tools like list_tables or create_event, which target specific operations. The added emphasis on read-only SELECT further clarifies its scope.

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 description implies usage: it is the tool for arbitrary read-only SQL queries. However, it provides no explicit guidance on when to use it versus specialized siblings like list_tables or describe_schema, nor does it mention any exclusions. The context is implied but not directly stated.

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