Skip to main content
Glama
simone202120

ecommerce-mcp-server

by simone202120

sales_summary

Read-onlyIdempotent

Calculate revenue, order count, and average order value for a date range, grouped by day, week, or month. Returns zero totals when no orders exist.

Instructions

Revenue, number of orders and average order value (AOV) between two dates, in total and per day, week (starting Monday) or month. Cancelled orders are excluded; a range with no orders returns zero totals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateYesLast day included, YYYY-MM-DD (UTC).
group_byNoPeriod size for the breakdown. Default 'day'.day
start_dateYesFirst day included, YYYY-MM-DD (UTC). Must be on or before end_date; the range may span at most 731 days.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodsYes
end_dateYes
group_byYes
start_dateYes
total_ordersYes
total_revenueYes
average_order_valueYes

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 already mark the tool read-only, idempotent, and non-destructive, so the description does not need to re-state safety. It adds valuable behavior beyond the schema: canceled orders are excluded, empty ranges return zero totals, and week grouping starts on Monday. These are meaningful edge-case disclosures.

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?

A single, information-dense sentence front-loads the core metrics, then covers date range, grouping options, exclusions, and empty-range behavior. Every clause earns its place; there is no filler or repetition of schema details.

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

Completeness5/5

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

Given the read-only annotations, a fully descriptive input schema, and an existing output schema, the definition covers the essential behavioral nuances: aggregation scope, grouping, cancellation exclusion, and zero-total behavior. Nothing an agent needs to decide whether and how to call this tool is missing.

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 adds semantic value by specifying that 'week' grouping starts on Monday and that the result includes both a total and a per-period breakdown. This goes beyond the schema's terse 'Period size for the breakdown'.

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

Purpose4/5

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

The description clearly identifies the tool's output: revenue, order count, and AOV for a date range, with optional daily/weekly/monthly breakdowns. It does not use an explicit verb like 'returns' and does not name a sibling alternative, but the metrics and date scope make the purpose unmistakable and distinguish it from order/product/inventory siblings.

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?

The description implies when to use the tool—when aggregate sales metrics over a date range are needed—but it does not explicitly state when not to use it or point to alternatives such as get_customer_orders for per-customer detail. The grouping and exclusion behavior help, but there is no direct routing guidance.

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