Skip to main content
Glama
victorshevtsov

Shop MCP Server

top_customers_by_spend

Identify top customers by total spend from non-cancelled orders, with optional date range filtering. Returns each customer's name, order count, and total amount spent.

Instructions

Top customers by total spend (sum of orders.total_amount), EXCLUDING cancelled orders. Optionally filter by a date range on order_date. Each row: { customer_id, name, orders, total_spent }. Default limit 10.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoOnly include orders with order_date <= this ISO date/datetime.
fromNoOnly include orders with order_date >= this ISO date/datetime.
limitNoMax customers to return.
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It clearly discloses a meaningful filtering behavior (excluding cancelled orders), an optional date-range filter, and the default limit of 10. This is strong coverage for a read-only ranking tool, though it does not mention ordering direction or potential tie-breaking.

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 dense sentences with no filler. The core computation and exclusion rule are front-loaded, followed by the optional filter, output shape, and default. Every sentence earns its place.

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?

The description gives enough to call and understand the tool correctly: metric definition, exclusion rule, optional filters, output row shape, and default limit. It lacks only minor details like explicit sort order and whether 'orders' is a count, which are largely inferable from context.

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. The description adds value beyond the schema by tying the date parameters to order_date and explicitly stating the default limit of 10, which the schema does not mention. It also clarifies that all filters are optional.

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 ranked list resource ('top customers by total spend'), defines the metric as sum of orders.total_amount, and explicitly excludes cancelled orders. The row-shape preview also clarifies exactly what is returned, and the metric clearly distinguishes it from siblings like top_products_by_quantity or customers_by_order_count.

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 makes the tool's scope clear enough to infer when to use it, but it does not explicitly state when to prefer it over sibling tools such as customers_by_order_count or revenue_by_period. No exclusions or alternative-routing guidance is provided.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/victorshevtsov/shop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server