Skip to main content
Glama

get_top_customers

Identify top customers by total spending or order count, excluding cancelled orders. Choose ranking by spending or orders to answer who spent or ordered the most.

Instructions

Get the top customers ranked by total amount spent or by number of orders placed. Cancelled orders are excluded from totals. Use this instead of query for 'who spent the most' / 'who ordered the most' questions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byYes
limitNo
Behavior4/5

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

No annotations are present, so the description carries the behavioral burden. It discloses the important ordering rule that cancelled orders are excluded from the calculations, which materially affects results. It does not spell out the return shape, but 'get' strongly implies a read-only list operation.

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?

Three short sentences, each earning its place: the operation, the non-obvious data restriction, and the usage routing. No filler, no tautology, and intent is front-loaded.

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?

Given only two parameters and no output schema, the description covers the main decision points: what the ranking means, how to choose the ordering, and which sibling tool to prefer. Omitted details like pagination or exact response fields are minor for this simple, well-scoped reader.

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?

The schema has0% description coverage, but the description maps 'spending' to total amount spent and 'orders' to order count, giving meaning to the enum. The `limit` parameter's purpose is also inferable from its default/minimum/maximum, so the critical required parameter is fully interpreted.

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 specifies both the verb+resource ('Get the top customers') and the two exact rankings that define the tool's behavior ('total amount spent' or 'number of orders placed'). This clearly separates it from generic querying and from other top_N tools.

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

Usage Guidelines5/5

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

It explicitly tells the agent when to use this tool instead of the generic `query` tool: for 'who spent the most' / 'who ordered the most' questions. This is direct, practical routing guidance.

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/denezhkinia/shop-db-mcp'

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