Skip to main content
Glama
Analytics MCP server

Analytics MCP server

by aby3941

get_metric

Read-onlyIdempotent

Computes a selected metric for each calendar month across a date range, optionally grouped by a dimension, returning monthly values for analysis.

Instructions

Compute a metric for each calendar month from start_month to end_month (inclusive, YYYY-MM, at most 36 months), optionally grouped by one of the metric's dimensions (group_by). Returns rows of [month, value] or [month, group, value]. Use this for any question a listed metric answers.

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>",
      "start_month": "<start_month>",
      "end_month": "<end_month>"
    },
    "name": "get_metric"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricYes
group_byNo
end_monthYes
start_monthYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, so the description only needs to add operational context. It does add real constraints (inclusive range, hard cap of 36 months, two possible row shapes), but says nothing about what happens on an invalid metric name or an over-long range.

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 sentences, no filler; the range constraint and output shape come first, then the usage rule. Every clause carries information an agent needs.

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 month-range limits are explicit, so the core contract is complete. The notable gap is value discovery: neither the description nor the schema says how to obtain valid metric names or dimension names, even though list_metrics exists as a sibling.

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%, so the description must carry the load, and it does: it defines start_month/end_month format (YYYY-MM) and inclusivity, explains group_by as one of the metric's dimensions, and implies metric must be a listed metric. It never enumerates or points to the valid metric/dimension values.

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 (compute a metric) plus the exact emission shape (one row per calendar month) and output row format. It is distinguishable from run_sql by the month-bucketing contract, though it never names its siblings to sharpen the contrast.

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?

'Use this for any question a listed metric answers' gives a clear selection rule that implicitly steers away from run_sql for metric questions. It stops short of explicit exclusions (e.g., ad-hoc SQL, non-monthly granularity) or naming list_metrics as the discovery step.

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