Skip to main content
Glama
mcp-server

mcp-server

by yasabbasi

metrics_breakdown

Read-only

Splits one metric by dimension or category over a date range, returning ranked slices with summed revenue, units, counts and recomputed ratios.

Instructions

One metric split by by, category or distribution_center, over start to end (ISO dates, both included). slices holds each slice's name and value, largest first; at most 50 are returned, and truncated says whether there were more. Counts and money are summed over the days, and aov, return_rate and conversion_rate are recomputed from the slice's summed parts; a ratio is null when its denominator is 0. Ratios are fractions between 0 and 1, rounded to four places. orders, product_view_sessions and converted_sessions are distinct within the slice, and they and every ratio must not be summed across slices; a slice's aov is revenue per order in that slice. adds_up says whether the slices add up to the total, true only for revenue, units and returned_units. approximate is true for the session metrics over more than one day, because a session that crosses midnight is counted on both days. On contract v1 outputs only revenue, units, returned_units and return_rate can be split; call metrics_daily_totals for the others. includes_provisional is true when the range reaches restated_from, so the numbers may still change. Call metrics_freshness for the dates the data covers and the contract version.

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": {
      "start": "<start>",
      "end": "<end>",
      "metric": "<metric>",
      "by": "<by>"
    },
    "name": "metrics_breakdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYes
endYes
startYes
metricYes

Output Schema

NameRequiredDescriptionDefault
byYes
metricYes
slicesYes
adds_upYes
truncatedYes
approximateYes
restated_fromYes
includes_provisionalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, but the description adds substantial behavior: slices ordered largest first, hard cap of 50 with a `truncated` flag, additivity rules via `adds_up`, the `approximate` caveat for multi-day session metrics, `includes_provisional` when the range reaches `restated_from`, and null ratios on zero denominators. It also warns which metrics must never be summed across slices, which prevents a real analysis error.

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?

Front-loads purpose, then layers output semantics and caveats, with every sentence carrying a distinct constraint. It is a single dense paragraph of backticked fragments, which is efficient but harder to scan than a short bulleted structure would be.

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 4-required-param read tool with an output schema, coverage is strong on output semantics, additivity traps, and data-freshness caveats. The remaining gap is input enumeration: legal `by` values and accepted `metric` names are implied but not stated, which matters at 0% schema description coverage.

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 0%, so the description carries the burden and does clarify `start`/`end` (ISO dates, both included) and constrains `metric` by contract version. However, `by` is ambiguous — the phrasing 'split by `by`, `category` or `distribution_center`' leaves unclear whether those are the only legal values or examples — and no accepted metric names or value formats are enumerated.

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?

Opens with a specific resource and scope: one metric split by a dimension over an inclusive ISO date range. The `slices` sentence makes clear it returns per-slice values rather than raw rows, and the routing to `metrics_daily_totals` and `metrics_freshness` tells an agent how this differs from siblings.

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 when-not rule ('On contract v1 outputs only revenue, units, returned_units and return_rate can be split; call metrics_daily_totals for the others') and routes date/contract-version questions to `metrics_freshness`. These are the two decisions an agent realistically has to make before calling.

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