Skip to main content
Glama
trhonpavel
by trhonpavel

Sales report

sales_report
Read-only

Compute sales metrics for any date range: order count, revenue, average order value, units sold, unique customers, a time series, and top products. Canceled and draft orders are excluded.

Instructions

Computes sales for a period: order count, revenue, average order value, units sold, unique customers, a time series (day/week/month) and top products. Amounts are per currency. Canceled and draft orders are excluded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTo date (inclusive), e.g. 2026-09-30
fromYesFrom date, e.g. 2026-09-01
top_nNoHow many top products to return
group_byNoday
timezoneNoIANA timezone used for date boundaries and bucketsUTC
only_paidNoOnly count paid orders (captured / partially_refunded / partially_captured)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, and the description adds real behavioral context: canceled and draft orders are excluded, amounts are per-currency (so no cross-currency rollup), and a time series is produced. It stops short of disclosing performance, limits, or empty-range behavior.

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 tight sentences, front-loaded with the metric list and followed by the important scoping caveats. No filler or redundancy.

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 usefully enumerates the returned metrics and the exclusion rules that determine the numbers, which is the key information an agent needs. It omits how currency grouping interacts with the totals and what the top-products ordering is based on.

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 83%, so the schema already documents from/to/top_n/timezone/only_paid. The description only indirectly echoes parameters by mentioning day/week/month buckets and top products, and does not clarify only_paid or timezone semantics beyond the schema. Baseline 3 is appropriate.

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 (computes) and resource (sales report) and enumerates the exact metrics returned: order count, revenue, AOV, units, unique customers, time series, and top products. This makes it clearly distinguishable from the sibling list/get tools, which return raw entities.

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

Usage Guidelines3/5

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

Implicitly signals it is an aggregation tool rather than a record lister, and notes that canceled and draft orders are excluded. However, it never states when to prefer this over list_orders plus manual aggregation, nor any prerequisite or exclusion guidance.

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