Skip to main content
Glama
simone202120

ecommerce-mcp-server

by simone202120

top_products

Read-onlyIdempotent

Identify best-selling products between two dates, ranked by revenue or units sold. Excludes cancelled orders and returns an empty list if no sales occur.

Instructions

Best-selling products between two dates, ranked by revenue or by units sold. Cancelled orders are excluded; a range with no sales returns an empty list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoRank by 'revenue' or units sold ('quantity').revenue
limitNoMaximum rows to return (1-50). Default 10.
end_dateYesLast day included, YYYY-MM-DD (UTC).
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
end_dateYes
productsYes
ranked_byYes
start_dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is established. The description adds valuable behavioral context by stating that cancelled orders are excluded and that a salesless range returns an empty list, which helps set agent expectations.

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?

The description is two sentences with no filler, front-loading the core purpose and adding an edge-case behavior second. Every word contributes to understanding the tool's function.

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?

Combined with the complete input schema, an output schema, and annotations, the description covers the remaining operational nuances: date-bounded ranking, exclusion of cancelled orders, and empty-list behavior. Nothing essential for correct invocation is missing.

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?

Input schema coverage is 100%, with thorough descriptions for start_date, end_date, limit, and the by enum. The description does not need to repeat those details; it adds only the high-level ranking concept already implied by the schema.

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?

The description opens with 'Best-selling products between two dates, ranked by revenue or by units sold,' clearly specifying the verb, resource, and ranking dimension. This makes the tool's purpose distinct from siblings like get_customer_orders or sales_summary without ambiguity.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool: retrieving top products in a date range, optionally ranked by revenue or quantity. It does not explicitly name sibling alternatives or when-not-to-use conditions, but the use case is evident enough for an agent to select it appropriately.

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