Skip to main content
Glama

query_database

Run read-only SELECT statements on any SQLite database. Retrieve data for analysis or dashboard building.

Instructions

Run a SELECT query against the SQLite database.
Only read-only SELECT statements are allowed.

Args:
    sql: A valid SQLite SELECT statement

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

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and partially meets it by disclosing the read-only constraint ('Only read-only SELECT statements are allowed'). It does not cover error handling for non-SELECT input, permissions, or other runtime behavior, so the disclosure is useful but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded: purpose first, then the key constraint, then the argument. The Args section slightly repeats the SELECT requirement from the opening line, but the overall size is appropriate with minimal waste.

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?

The tool is simple (one parameter) and an output schema exists, so the description need not explain return values. It covers purpose, the read-only constraint, and the parameter meaning, which is nearly sufficient; the main gap is the lack of sibling routing guidance, but that is a minor omission given the tool's straightforward scope.

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 description coverage is 0%, so the description must compensate. It does add meaning by specifying the parameter must be a valid SQLite SELECT statement (not arbitrary SQL), but it offers no detail on result handling, parameter binding, or syntax expectations beyond that. Partial compensation, not full.

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 states a specific verb ('Run') and resource ('SELECT query against the SQLite database'), making the tool's function clear. It does not explicitly distinguish itself from read-oriented siblings like list_tables or sample_table, but the 'arbitrary SELECT' scope is implied well enough for an agent to infer it.

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

Usage Guidelines2/5

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

The description only says 'Only read-only SELECT statements are allowed' — a hard constraint, not usage guidance. It gives no indication of when to use query_database versus list_tables, describe_table, or sample_table, leaving the agent to infer routing on its own.

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