Skip to main content
Glama

getCustomers

Read-only

List customers (users and companies) in the authenticated network, or find them by name. To find a customer the user names, pass only query (the name, email, phone number or company as written) before listing anything: it searches people and companies, members and former customers, at every location, and returns the 10 best matches first. Omit locationRef to list customers across all locations, or provide it to scope to one location. Call getLocations to list locations, or getLocation to fetch one by locationId. Filter by type and membershipType, and sort with order.

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

Input Schema

NameRequiredDescriptionDefault
typeNoFilter by customer type. Defaults to both when omitted. Must be a single value when order is createDate. Comma-separated, one or more of: user, company.
limitNoMaximum number of customers per page. Defaults to 100 when omitted or invalid, or to 10 matches with `query`; values above 100 are capped at 100.
orderNoSort order in `field:direction` format, e.g. `name:asc` or `createDate:desc`. Defaults to `name:asc` when omitted.
queryNoSearch customers by a person's name, surname and company, or a company's title, matching any part of a word in any order, tolerating misspellings and Cyrillic or Latin spellings, and by the beginning of their email or phone number. A query containing `@` is matched by email only. A query made only of digits, spaces, `+`, `-`, `.` and brackets is matched by email and by the digits of the phone number only; without a leading `+`, it also matches a phone number typed without the country code of the location's business address. Searches members and nonmembers of both types at every location unless type, membershipType or locationRef narrow it. Returns at most `limit` matches (10 by default), email matches first, then phone number matches, then the closest by spelling, in one page without `nextPageToken`; `order` does not apply.
userRefNoUUID of a user: lists the person customers of that user, one per location they belong to, in one page without `nextPageToken`. Companies have no user, so `type=company` returns none. The other filters still apply.
locationRefNoUUID of the location whose customers to list. Omit to list customers across every location of the network.
nextPageTokenNoPagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page.
membershipTypeNoFilter by membership type: `member` for current members, `nonmember` for former members and customers who never subscribed. Defaults to `member` when omitted, or to both with `query`. Comma-separated, one or more of: member, nonmember.

Output Schema

NameRequiredDescriptionDefault
customersYes
nextPageTokenNoPass it back as nextPageToken, with the same filters, to get the next page. Absent on the last page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / query / description
      Previous value: -"Search customers by a person's name, surname and company, or a company's title, matching any part of a word in any order, tolerating misspellings and Cyrillic or Latin spellings, and by the beginning of their email or phone number. A query containing `@` is matched by email only. A query made only of digits, spaces, `+`, `-`, `.` and brackets is matched by email and by the digits of the phone number only. Searches members and nonmembers of both types at every location unless type, membershipType or locationRef narrow it. Returns at most `limit` matches (10 by default), email matches first, then phone number matches, then the closest by spelling, in one page without `nextPageToken`; `order` does not apply."New value: +"Search customers by a person's name, surname and company, or a company's title, matching any part of a word in any order, tolerating misspellings and Cyrillic or Latin spellings, and by the beginning of their email or phone number. A query containing `@` is matched by email only. A query made only of digits, spaces, `+`, `-`, `.` and brackets is matched by email and by the digits of the phone number only; without a leading `+`, it also matches a phone number typed without the country code of the location's business address. Searches members and nonmembers of both types at every location unless type, membershipType or locationRef narrow it. Returns at most `limit` matches (10 by default), email matches first, then phone number matches, then the closest by spelling, in one page without `nextPageToken`; `order` does not apply."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already set readOnlyHint=true and destructiveHint=false, but the description adds non-obvious behavior: query searches members and former customers at every location, returns the 10 best matches first in a single page without nextPageToken, and order does not apply to query results. These are traits the agent could not derive from annotations or schema alone.

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 list/search distinction and organized logically through scoping, alternatives, and filters. Some clauses duplicate the already-detailed query schema description, making the block denser than strictly necessary.

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 an output schema present and annotations covering safety, the description supplies everything else an agent needs: mode selection, location scoping, sibling tools for locations, and the special result semantics when query is used.

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, but the description adds cross-parameter meaning the schema does not state: pass only query for named lookups, and locationRef omission means network-wide. Remaining param mentions (type, membershipType, order) largely restate the schema.

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 and resource with its scope: "List customers (users and companies) in the authenticated network, or find them by name." It also establishes the two operating modes (browse vs. search), which an agent can distinguish immediately without opening the schema.

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?

Gives explicit routing: use query alone when the user names a customer, "before listing anything"; omit locationRef to span all locations or supply it to scope; and it names getLocations and getLocation for resolving locations. The when-to-use conditions are stated rather than inferred.

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