Skip to main content
Glama

query_metric

Computes certified simple, ratio, or derived metrics with filters, dimensions, time ranges, and role-based access; returns results to cite by metric name and version.

Instructions

Compute a certified metric (simple, ratio or derived). Cite name and version in answers. Omit as_role when server is started with a bound --role.

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

Input Schema

NameRequiredDescriptionDefault
dimsNo
limitNo
metricYes
as_roleNo
filtersNo
order_byNo
time_grainNo
time_rangeNo
entity_keysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden, and it discloses little: "certified" hints at governance but is undefined, and "Cite name and version in answers" implies the response carries metric name/version but not what else is returned. Nothing is said about permissions, whether computation is read-only, row limits, or failure modes on unknown metrics.

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?

Three short sentences, front-loaded with the core action, and no filler or repetition. The final sentence is terse to the point of being cryptic about the --role binding, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a 9-parameter analytical query tool with no annotations, no output schema, and zero schema descriptions, so the description should be doing substantial work and instead covers one parameter. An agent cannot determine how to shape dims, filters, time_range, or limit from this definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 9 parameters, so the description must compensate and it only addresses as_role, leaving dims, filters, time_range, time_grain, order_by, entity_keys, and limit entirely undefined. It adds no syntax, format, or accepted-value detail for any of the documented-in-name-only fields.

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?

"Compute a certified metric (simple, ratio or derived)" gives a specific verb plus resource and names the metric families it covers, so an agent can tell what it does. It does not explicitly distinguish itself from the sibling query_metrics or describe_metric, leaving differentiation to inference from the names alone.

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?

The only conditional guidance is "Omit as_role when server is started with a bound --role," which covers one parameter's edge case rather than when to choose this tool over query_metrics, describe_metric, or search_metrics. No prerequisites, no exclusions, no statement of what kind of question this tool answers.

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