Skip to main content
Glama

ask

Translate a plain-English question about a governed metric or dataset into role-aware SQL and return results with masking details and an audit ID.

Instructions

Ask a plain-English question about a defined metric or dataset, e.g. 'How many encounters per month in 2025 by payer?'. The server maps it to a definition, applies your role's rules, generates SQL itself, and returns the SQL, the result, any masking applied, and an audit id. Denials include a reason_code.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
questionYes

Output Schema

NameRequiredDescriptionDefault
sqlNo
kindNo
rowsNo
grainNo
targetNo
columnsNo
filtersNo
messageNo
outcomeYes
candidatesNo
dimensionsNo
reason_codeNo
row_filtersNo
cost_estimateNo
audit_event_idNo
masked_columnsNo
suppressed_cellsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the server-side pipeline (maps the question to a definition, applies the caller's role rules, generates SQL), states that masking may be applied, returns an audit id, and that denials carry a reason_code. It stops short of latency/cost expectations or what happens on ambiguous questions.

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?

Three tight sentences, front-loaded with the verb and example, then the behavioral pipeline, then the failure mode. No filler or restatement of the tool name.

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?

Even though an output schema exists and return values need not be explained, the description still summarizes the response shape (SQL, result, masking, audit id) and the denial path. Combined with the role-governance note, an agent has everything needed to invoke it correctly.

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 coverage is 0% for the single required `question` parameter, so the description must compensate, and it does: it declares the parameter is plain English and supplies a realistic example ("How many encounters per month in 2025 by payer?"). It does not say anything about question length limits, required dimensions, or unsupported phrasings.

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?

"Ask a plain-English question about a defined metric or dataset" gives a specific input modality (natural-language question) plus the resource (metric/dataset) and a concrete example. The "plain-English" framing implicitly separates it from the structured-parameter sibling query_metric, though no sibling is named explicitly.

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 "about a defined metric or dataset" plus the example question, which tells an agent the shape of a valid call. There is no explicit when-to-use / when-not guidance and no routing to alternatives such as describe_metric for learning a definition or list_metrics for discovery.

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