Skip to main content
Glama

Top Customers

top_customers
Read-onlyIdempotent

Retrieve top revenue-generating customers for a date range, including order counts and last order dates, optionally filtered by customer segment.

Instructions

The customers who generated the most revenue in a period, with order count and last order date.

Optionally filter by segment (Consumer, SMB, Enterprise). Emails are only shown to roles with bella:pii.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "top_customers"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many customers to return (1-50).
segmentNo
end_dateNoInclusive date, YYYY-MM-DD. Omit for no limit.
start_dateNoInclusive date, YYYY-MM-DD. Omit for no limit.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, so the description's job is to add context beyond that. It does so meaningfully by disclosing a permission gate — emails only surface for roles holding bella:pii — which is exactly the kind of authorization/visibility detail annotations cannot express. It stops short of stating ordering (descending by revenue) or tie-handling.

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 in a clear order: what is returned, how to narrow it, and the access restriction. Nothing is padded and the purpose 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?

For a four-parameter read-only ranking tool with an output schema and full annotation coverage, the definition supplies the essential extras: ranking basis, returned measures, and the PII access rule. The remaining omissions (sort direction, behavior with very short or empty date ranges) are minor against structured fields that already carry the rest.

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?

Schema coverage is 75%, so limit and the start/end date parameters are already documented in the schema. The description re-enumerates the segment values (Consumer, SMB, Enterprise) that the schema's anyOf enum already contains, adding discoverability but little new meaning, and it does not clarify the period semantics beyond the schema's inclusive YYYY-MM-DD notes.

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 names the resource precisely ('customers who generated the most revenue in a period') and the returned measures (order count, last order date), which sharpens it beyond the bare title 'Top Customers'. It does not explicitly contrast itself with the siblings customer_profile or sales_summary, so an agent must infer the ranking-vs-profile distinction.

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?

Usage is only implied: the agent can deduce this is the tool for ranking customers by revenue within a time window, and the 'optionally filter by segment' line hints at a narrowing case. There is no explicit when-to-use versus customer_profile/sales_summary, and no stated prerequisites or exclusions.

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