Skip to main content
Glama
sql-analyst
by Yehiak

Ask a question about the data

ask_data
Read-onlyIdempotent

Answers business questions in English or Arabic by writing, validating, and running SQL, then explaining the result with rows and a chart.

Instructions

Answer a business question with this server's agent: it writes the SQL, checks it, runs it, fixes it if it fails, and explains the result in the question's language.

Returns the answer, the SQL that ran, up to 200 rows, a chart spec and (optionally) a PNG chart. Takes 5-30 seconds.

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": {
      "question": "<question>"
    },
    "name": "ask_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
chartNoAlso return the chart as a PNG image when the result suits one.
questionYesA business question in English or Arabic, e.g. 'Monthly revenue in 2017' or 'ما متوسط تقييم المراجعات؟'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already establish that this is a safe, idempotent read, and the description adds substantial context beyond them: the self-repair loop on SQL failure, the exact return payload (answer, executed SQL, up to 200 rows, chart spec, optional PNG), response-language behavior, and a 5-30 second latency expectation. The 200-row cap is exactly the kind of behavioral constraint that cannot be derived from annotations.

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?

Two short blocks, front-loaded with the purpose and followed by the return contract and latency. Every sentence carries information an agent would otherwise have to discover by calling the tool.

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?

With no output schema present, the description fully compensates by enumerating the response components, and it adds the timing expectation and row cap an agent needs to plan a call. Nothing material is missing for a two-parameter question-answering tool.

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 100%, including bilingual examples for the question parameter and an explicit note on when the chart PNG is produced, so the schema carries the parameter burden. The description reinforces the language behavior and the optional chart output but adds no syntax or format detail beyond what is already structured. Baseline 3 is appropriate.

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 and resource ("Answer a business question") and then details the internal pipeline: writes SQL, checks it, runs it, repairs on failure, and explains the result. The phrase "it writes the SQL" implicitly separates it from a raw SQL executor like run_sql, but no sibling is ever named, so the differentiation 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 Guidelines3/5

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

Usage is implied by "Answer a business question" and by the natural-language question parameter, but there is no explicit statement of when to prefer this over run_sql or describe_table, and no exclusions or prerequisites. An agent must infer the routing decision.

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