Skip to main content
Glama

Metric compare

metric_compare
Read-onlyIdempotent

Deterministically compares one non-negative observed metric with a positive target. Use ONLY when the person explicitly asks for the numeric difference, percentage gap or target-attainment percentage. A normal performance-vs-target answer should state both values and above/below without this extra call. Returns observed, target, signed difference, relative difference percent, attainment percent and above/below/equal. Do not use it for causal claims or trends. MCP: use the input object for tool arguments. UI reports and questions are returned as structured content. Free: MCP tool calls use no Adrails credits.

Input Schema

NameRequiredDescriptionDefault
inputYes
accountIdsNoOptional account selection; can only narrow this workspace's access.
userStatementNoRequired for launch_brief: the latest verbatim user request or free-text answer. Otherwise optional user-provided context, treated as an unverified user statement, never permission or verified platform evidence.
idempotencyKeyNoRequired for mutations. Reuse the same key only when retrying the exact same call; a completed outcome is applied once.

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 cover safety (readOnly, idempotent, non-destructive), but the description adds real value: determinism, the full enumeration of returned fields despite no output schema, the input domain constraints, and a cost note that calls consume no credits. The trailing 'MCP: use the input object...' boilerplate is generic and not tool-specific, which keeps it just 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.

Conciseness4/5

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

The first three sentences are front-loaded and each earns its place: purpose, usage gate, and returns. The appended MCP/credits boilerplate is workspace-standard filler that dilutes an otherwise tight definition.

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?

For a simple read-only two-number comparison with no output schema, the description covers purpose, gating, return fields, and input domain. The only real gap is unit/scale expectations and what happens with edge cases like a zero-ish observed value, which an agent may need to reason about.

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?

Schema coverage is 75%, so the baseline is 3. The description does add domain meaning to the two undocumented nested fields by stating observed must be non-negative and target positive, but it says nothing about accountIds scoping or whether both values must share units — the more consequential semantic question for a ratio computation.

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 — deterministically compares an observed metric against a target — and pins the exact output semantics (signed difference, relative difference percent, attainment percent, above/below/equal). It is clearly distinguishable from sibling metric tools like metrics_daily or performance_period, which report values rather than a single computed comparison.

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?

Gives an explicit gate: use ONLY when the person explicitly asks for the numeric difference, percentage gap, or attainment percentage, and explicitly says a normal performance-vs-target answer should just state both values without this call. It also names an exclusion ('not for causal claims or trends'), leaving almost nothing to inference.

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.