Skip to main content
Glama

List an agent's leads

list_leads
Read-onlyIdempotent

List an agent's leads

Pinned leads (pinned: true) come first, on the first page only, then the rest newest first. Later pages never contain pinned leads, so if more leads are pinned than limit, the extra ones are not returned: use a limit (up to 100) above the number of pinned leads. The filters (status, search, creation dates, assignee and custom fields) combine: a lead is listed only when it matches all of those sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoPage size, 1 to 100 (values outside are clamped). Default 20.
cursorNoOpaque cursor from the previous page's `next_cursor`. Omit for the first page. A cursor the API didn't return is `422 invalid_request`.
searchNoMatches the name or phone.
statusNoOne or more of the agent's lead statuses, comma-separated, written exactly as `listLeadFields` returns them.
date_toNoOnly those created on or before this date (UTC), the whole day included. Send a date such as `2026-10-11`; a date-time is read as its date.
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.
date_fromNoOnly those created on or after this date (UTC). Send a date such as `2026-10-01`; a date-time is read as its date.
assigned_toNoOnly the leads assigned to this teammate (a `user_id` from `listAgentMembers`), or `unassigned` for the leads assigned to no one. `me` isn't taken, because a key isn't a person; it and any other value are `422 invalid_request_body`.
custom_fieldsNoOnly the leads whose custom fields match: a URL-encoded JSON object that maps a field's key (from `listLeadFields`) to a clause, such as `{"city": {"op": "eq", "values": ["Cairo"]}, "budget": {"op": "is_null"}}`. `op` is `eq` (one value), `in` (one or more), `ilike` (one value the field contains, ignoring case, where `%` and `_` are wildcards), `between` (two values: from the first, included, to the second, excluded) or `is_null` (no `values`). Values are JSON strings, numbers or booleans, compared with the stored value as text: write dates `YYYY-MM-DD` for `between`, and don't expect numbers to compare by size. Clauses combine with AND. A lead without the key reads as null there: it matches `is_null` and no other op. At most 10 keys and 100 values in all; anything else is `422 invalid_request_body`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent and non-destructive, so the bar is lower, yet the description still adds substantial non-obvious behavior: pinned leads sort first on page one only, later pages never contain them, pin overflow beyond `limit` is silently not returned, and the sent filters combine with AND. This ordering and exclusion semantics is exactly the kind of trait an agent cannot infer from structured fields.

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?

Two tight paragraphs, with the consequential pinned-lead caveat front-loaded ahead of the filter-combination rule. The only waste is the first line, which restates the title rather than advancing the description.

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 9-parameter list tool with full schema coverage and no output schema, the description covers the tricky operational semantics (pagination, pinning, filter conjunction). It leaves the shape of a returned lead undescribed, which is the main remaining gap given there is no output schema.

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 cannot express: the enumerated filters (status, search, creation dates, assignee, custom fields) combine conjunctively rather than unioning. The `limit` up-to-100 note merely repeats the schema's maximum.

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 opens with a specific verb+resource phrase, 'List an agent's leads', which mirrors the title and makes the plural/list scope distinct from the sibling get_lead. It does not explicitly name alternatives like get_lead or list_lead_fields, so differentiation is implicit rather than stated.

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?

It gives an actionable invocation rule — set `limit` above the number of pinned leads to avoid silently dropping them — which is real usage guidance. However, there is no when-to-use-this-vs-siblings guidance (e.g. get_lead for a single lead, list_lead_fields for status/field keys), leaving the routing to inference.

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