Skip to main content
Glama

query_metric

Query a governed metric or dataset by name, dimensions, columns, optional grain and year to retrieve policy-enforced lakehouse results.

Instructions

Structured form of ask: name a metric or dataset from list_metrics, plus dimensions (metrics), columns (datasets), an optional grain and year.

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

Input Schema

NameRequiredDescriptionDefault
nameYes
yearNo
grainNo
columnsNo
dimensionsNo

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

A3.5/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It says nothing about whether the call is read-only, whether it enforces permissions, how invalid names or grain values fail, or any rate limits — the only behavioral signal is that grain and year are optional, which the schema already states via defaults.

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?

A single dense sentence with the most important information (the relationship to `ask` and the name source) front-loaded, and no filler. The phrasing 'Structured form of ask:' is slightly oblique as an opener but remains compact.

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?

Return values are covered by the output schema, and the description adequately explains how to build a valid call for a five-parameter tool. However, for a tool with zero annotations and no parameter documentation anywhere else, the omission of read-safety and failure behavior leaves a gap an agent would want closed.

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?

With 0% schema description coverage across five parameters, the description does real work: it explains that `dimensions` applies to metrics while `columns` applies to datasets (a conditional distinction the schema cannot express), and that `grain` and `year` are optional narrowing controls. It could go further by noting the accepted grain values or that names must match `list_metrics` output exactly.

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 identifies the tool as the 'structured form of ask' that resolves a metric or dataset name, which distinguishes it from the free-form sibling `ask` and ties it to `list_metrics`. It stops short of stating the actual operation (retrieve/aggregate data) as a plain verb, so the resource and scope are inferred rather than declared.

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?

It gives clear routing context: use this structured variant when you can supply a name, and obtain that name from `list_metrics`. It does not state when to prefer `ask` over this, nor mention `describe_metric` as a prerequisite for discovering valid dimension/column names, so the guidance is clear but not exhaustive.

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