Skip to main content
Glama

ask_database

Pose a plain-language question about your SQLite database; the agent writes and runs the SQL, then returns the answer and the SQL used. Use thread_id for follow-up questions.

Instructions

Ask the database a question in plain language. The agent writes and runs the SQL itself. Reuse thread_id for follow-up questions. Returns the answer and the SQL used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYes
thread_idNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

It discloses useful behaviors: the agent writes and runs SQL, thread_id is reused for follow-ups, and the return value includes both the answer and the SQL used. However, with no annotations, it does not state whether mutations are allowed, whether the tool is read-only, or any safety or permission caveats for executing SQL.

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?

Four short sentences, each carrying distinct value: purpose, execution model, follow-up mechanism, and return value. There is no filler or repetition of schema fields.

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?

For a two-parameter tool with an output schema, the description covers what to pass and what to expect back. The main gap is not explicitly clarifying whether arbitrary SQL or only read-only queries are allowed, which is significant because the agent runs SQL itself.

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 description coverage is 0%, but the description compensates by explaining that question is a plain-language query and that thread_id should be reused for follow-up questions. It doesn't mention the default thread_id or expected question phrasing, but the key semantics are conveyed.

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 clearly states a specific verb and resource: ask the database a question in plain language, with the agent generating and executing SQL. This separates it from run_sql (direct SQL) and describe_schema (schema inspection) without needing to open the schema.

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 phrase 'in plain language' and 'the agent writes and runs the SQL itself' gives a clear usage context: use this when the agent must convert a natural-language question into SQL rather than executing pre-written SQL. It does not explicitly name alternatives or state when not to use it, so it stops short of full routing guidance.

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