Skip to main content
Glama

List customers

list_customers
Read-only

List CRM customers: companies that bought — a purchase order (processing, ready to ship, shipped, delivered or refunded, or with a settled payment) or a won deal that never became an order. Filter by health, lifetime-value bucket, owner, name search or minimum won deals; sorted by lifetime value and paginated. Returns summary rows (id, name, health, lifetimeValue = completed-order revenue plus won deals without an order, purchases = purchase orders plus won deals without an order, repeat = two or more purchases, lastPurchaseAt, wonDealsCount = every won deal, lastActivityAt, owner) plus pagination { page, perPage, total }. Read-only. Use get_customer to fetch one customer's detail by company id; use list_people_customers for people who bought without a company (shop buyers).

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": "list_customers"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoFree-text search over the customer company name. Omit for no text filter.
ltvNoFilter by lifetime-value bucket. Omit for any. Allowed: lt10k, 10k50k, gt50k.
pageNo1-based page number of results to return. Default 1.
healthNoFilter by customer health. Omit for any. Allowed: healthy, at_risk, churned.
ownerIdNoFilter to customers owned by this workspace member's user id.
perPageNoNumber of customers per page (1-100). Default 25.
sortDirNoSort direction by lifetime value. Default desc (highest first).desc
wonDealsMinNoOnly customers with at least this many won deals (orders are not counted here).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / wonDealsMin / description
      Previous value: -"Only customers with at least this many won deals."New value: +"Only customers with at least this many won deals (orders are not counted here)."
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed8 schema fields changed
    • addedInput schema / properties / health / description
      Added value: +"Filter by customer health. Omit for any. Allowed: healthy, at_risk, churned."
    • addedInput schema / properties / ltv / description
      Added value: +"Filter by lifetime-value bucket. Omit for any. Allowed: lt10k, 10k50k, gt50k."
    • addedInput schema / properties / ownerId / description
      Added value: +"Filter to customers owned by this workspace member's user id."
    • addedInput schema / properties / page / description
      Added value: +"1-based page number of results to return. Default 1."
    • addedInput schema / properties / perPage / description
      Added value: +"Number of customers per page (1-100). Default 25."
    • addedInput schema / properties / q / description
      Added value: +"Free-text search over the customer company name. Omit for no text filter."
    • addedInput schema / properties / sortDir / description
      Added value: +"Sort direction by lifetime value. Default desc (highest first)."
    • addedInput schema / properties / wonDealsMin / description
      Added value: +"Only customers with at least this many won deals."
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only/non-destructive, but the description goes well beyond them: it discloses the sort key (lifetime value), pagination behavior, and the precise business definitions of computed fields (lifetimeValue, purchases, repeat, wonDealsCount). It does not mention auth/permission scoping or performance characteristics, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then filters, then return shape, then routing to siblings — a sensible order. It is dense but every clause carries information; the long parenthetical definitions of derived metrics are necessary only because there is no output schema.

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?

With no output schema, the description supplies the return row fields and the pagination object, plus the business rules behind computed fields. Combined with the filter list, an agent has everything needed to call this correctly and interpret results.

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 real meaning the schema lacks — notably that wonDealsMin counts won deals and explicitly not orders, and that repeat means two or more purchases — resolving the most likely source of mis-invocation.

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 verb+resource and defines the resource precisely ('companies that bought — a purchase order ... or a won deal that never became an order'), which an agent could not infer from the name alone. It also explicitly contrasts with get_customer and list_people_customers, so the boundary with siblings is unambiguous.

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?

Names the two closest alternatives and the exact condition selecting each: get_customer for one customer's detail by company id, list_people_customers for people who bought without a company. The filter dimensions are also enumerated so the agent knows which queries this tool can answer.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources