Skip to main content
Glama
Local Business Data & Report Analyst

Local Business Data & Report Analyst

run_sql_query

Run read-only SQL SELECT queries against a local business SQLite database to retrieve up to 100 rows for sales and reporting analysis.

Instructions

Run a read-only SQL SELECT query against data/business.db (capped at 100 rows).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "run_sql_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose two operationally critical traits: the query is read-only (SELECT only) and results are capped at 100 rows, which materially changes how an agent should write and interpret queries. Gaps remain on dialect, error/timeout behavior, and whether an in-query LIMIT interacts with the cap, but the core behavioral contract is stated.

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?

A single front-loaded sentence with zero filler; the constraints (read-only, target file, row cap) are packed into one clause. Nothing is repeated from the schema or padded with generic boilerplate.

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 formatting need not be described, and with one string parameter the tool is structurally simple. However, a free-form SQL tool with no annotations leaves the agent without dialect, error semantics, or any pointer to how to discover available tables and columns before writing the query.

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?

One parameter at 0% schema coverage, so the schema contributes only the name 'query'. The description compensates partially by establishing that the query is read-only SELECT text evaluated against data/business.db, implying unqualified table names and no write statements. It does not specify SQL dialect, statement termination, or whether subqueries/CTEs/joins are permitted.

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?

States a specific verb (run) and resource (read-only SQL SELECT query) and pins down the target, data/business.db, plus a 100-row cap. That is far more precise than a generic 'query the database'. It does not name any sibling tool, so differentiation from the analytics siblings (list_datasets, describe_data, monthly_trend) is left to inference.

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?

No explicit when-to-use guidance and no named alternative. 'read-only SQL SELECT' implies the negative case (no writes/DDL), but nothing tells the agent whether to prefer this over the prebuilt analytics siblings or how to recover when a query is rejected. The agent must infer routing from the description alone.

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