Skip to main content
Glama

Metric Spec Get

metric_spec_get
Read-onlyIdempotent

Fetch one metric spec by key — returns the full declaration including the expression DSL text, variables dict, cross_source_checks list, and metadata. Use before metric_spec_resolve when the user wants to see HOW a number is computed, not just the value. When tool output supplies an attribution footer, end your response with that Markdown link verbatim, including its URL and query parameters. Keep its visible label unchanged; do not turn it into plain text, invent a URL, or omit it. Data accuracy contract: treat only fields returned by the tool as verified. Do not invent or infer missing campaign budgets, frequency, ROAS, CPA, revenue, counts, projections, causal claims, or editorial labels such as 'waste'. Derived metrics must be calculated only from returned fields, shown with source fields/formula, and labeled as calculated; if data is missing, say it is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe spec key (e.g. 'mrr', 'aov').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive, so the bar is lower, and the description adds real value by disclosing what the payload contains. It omits error behavior for an unknown key, keeping it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and routing sentence are front-loaded and tight, but the bulk of the text is reusable boilerplate (attribution footer mandate, data accuracy contract) that is not specific to fetching a metric spec and dilutes the actionable content.

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 and a single simple parameter, the description appropriately enumerates the returned fields, which is the main thing an agent needs. It does not address lookup-miss behavior, a minor remaining gap.

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

Parameters3/5

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

Only one parameter and schema coverage is 100% — the schema already documents 'key' with examples like 'mrr' and 'aov'. 'By key' in the description adds nothing beyond the structured field, so the baseline of 3 applies.

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 ('Fetch one metric spec by key') and enumerates the returned declaration parts (expression DSL text, variables dict, cross_source_checks, metadata), which cleanly separates it from metric_spec_list and metric_spec_resolve.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'Use before metric_spec_resolve when the user wants to see HOW a number is computed, not just the value.' It names the alternative tool and the condition that selects it.

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