Skip to main content
Glama

top_customers

Rank customers by total spend or order count. Use by='spend' to sum revenue from completed and shipped orders, or by='order_count' to count non-cancelled orders.

Instructions

Rank customers either by total spend or by number of placed orders.

  • by='spend': sums orders.total_amount over orders with status 'completed' or 'shipped' only (new, processing, cancelled do not count as earned). Returns first_name, last_name, email, total_spend.

  • by='order_count': counts orders whose status is NOT 'cancelled'. Returns first_name, last_name, email, order_count. Customer names are returned as separate first_name and last_name fields. limit defaults to 100 (max 1000); offset paginates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNospend
limitNo
offsetNo
Behavior5/5

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

With no annotations, the description carries the behavioral disclosure burden, and it does this very well: it states exactly which order statuses count as earned for 'spend', which statuses are excluded, how 'order_count' treats cancelled orders, what fields are returned, and the limit/offset behavior. This goes well beyond what the schema provides.

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 dense but well organized, with a front-loaded purpose, clear bullet-style sections for each mode, and no filler. Every sentence communicates a useful constraint or behavior.

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?

For a 3-parameter tool with no output schema, the description is complete: it defines ranking semantics, status filtering, returned customer fields, the two allowed modes, limits, and pagination. An agent has enough information to call the tool correctly without guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must fully explain the parameters. It explains both valid values of `by`, the exact computation for each, the effect of `limit` with its default of 100 and cap of 1000, and the pagination role of `offset`. This fully compensates for the empty schema coverage.

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 names a specific verb ('Rank customers') and resource (customers) and immediately distinguishes the two ranking modes: total spend vs number of orders. It is clearly differentiated from siblings such as top_products and rank_countries_by_customers.

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 gives concrete usage context: how to choose by='spend' versus by='order_count', which statuses count for each mode, and how limit/offset behave. It does not explicitly name sibling alternatives or say when not to use this tool, but the conditional semantics are clear enough for selection.

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

Install Server

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/ablinovsibset-spec/internet-shop-mcp'

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