Skip to main content
Glama

Read one Ledger metric with its readings

ledger_metrics_get
Read-only

One metric's definition (unit, kind, direction, target, cadence) plus its readings newest first and the open decisions bound to it. Use before answering 'how is X trending?' or before recording a reading against it. metricId accepts the id or the snake_case slug from ledger_metrics_list. For an event metric whose readings carry labels, labels lists each label and its values, largest total first. Pass slice to get the series for part of it ("new users in DE"), or by to split the series by one label ("new users by country"); either returns series, summed per bucket.

Input Schema

NameRequiredDescriptionDefault
byNoEvent metrics only. A label name to split the series by.
sliceNoEvent metrics only. Per label, the values to keep: { country: ["DE", "AT"] } keeps readings from DE or AT; several labels must all match. Names and values come from `labels`.
bucketNoSeries bucket when `slice` or `by` is set. Default week.
metricIdYesMetric id or slug (from ledger_metrics_list).
workspaceNoWorkspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds genuine behavior beyond that: readings returned newest first, decisions bound to the metric, labels ordered by largest total, and series summed per bucket. It stops short of disclosing limits, pagination, or error behavior.

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?

Dense but front-loaded: the identity and return contents lead, followed by usage, then parameter guidance. Every sentence carries information, though the parameter clauses could be tightened slightly.

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

Completeness4/5

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

With no output schema, the description must carry return-value explanation, and it does (definition fields, readings, decisions, labels, series). A complex tool with a nested slice object is handled well; only edge behaviors like limits or error cases are absent.

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 100%, so the baseline is 3, but the description goes further with worked examples for slice and by ('new users in DE', 'new users by country') and clarifies that either produces a series summed per bucket. That meaning is not fully derivable from the schema text alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (read one Ledger metric) and enumerates what comes back: the definition fields, readings newest first, and bound open decisions. This is clearly distinguishable from the sibling ledger_metrics_list, which lists many metrics.

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?

Gives two concrete use contexts: before answering 'how is X trending?' and before recording a reading against it. It also points to ledger_metrics_list as the source of ids/slugs. No explicit when-not or exclusion cases are given, so it falls just short of the top band.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources