Skip to main content
Glama

Search leads

search_leads
Read-only

List and search this workspace's leads, filtered by text/status/source/created-date/stale and paginated. Returns summary rows (id, name, contact, company, status, source, assignee, tags, next-action, isStale, timestamps) plus pagination { page, perPage, total }, newest first. Use get_lead to fetch notes, position and score for one lead by id.

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

Input Schema

NameRequiredDescriptionDefault
qNoFree-text search over lead name, email, phone, or company. Omit for no text filter.
toNoOnly leads created at or before this ISO 8601 timestamp (e.g. 2026-02-28T23:59:59Z).
fromNoOnly leads created at or after this ISO 8601 timestamp (e.g. 2026-01-31T00:00:00Z).
pageNo1-based page number of results to return. Default 1.
staleNoSet true to return only stale leads: not unqualified/converted and either past their next-action date or untouched for more than 7 days.
sourceNoFilter by lead source key (e.g. website, referral, telegram). Use list_lead_sources to see the workspace's keys. Omit for all sources.
statusNoFilter by lead status. Omit to return every status. Allowed: new, contacted, qualified, unqualified, converted.
perPageNoNumber of results per page (1-100). Default 20.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    • changedInput schema / properties / to / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
  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. Changed2 schema fields changed
    • addedInput schema / properties / q
      Added value: +{
      +  "description": "Free-text search over lead name, email, phone, or company. Omit for no text filter.",
      +  "maxLength": 255,
      +  "type": "string"
      +}
    • addedInput schema / properties / stale
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "enum": [
      +        "true",
      +        "false"
      +      ],
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Set true to return only stale leads: not unqualified/converted and either past their next-action date or untouched for more than 7 days."
      +}
  4. Changed6 schema fields changed
    • addedInput schema / properties / from / description
      Added value: +"Only leads created at or after this ISO 8601 timestamp (e.g. 2026-01-31T00:00:00Z)."
    • 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 results per page (1-100). Default 20."
    • addedInput schema / properties / source / description
      Added value: +"Filter by lead source key (e.g. website, referral, telegram). Use list_lead_sources to see the workspace's keys. Omit for all sources."
    • addedInput schema / properties / status / description
      Added value: +"Filter by lead status. Omit to return every status. Allowed: new, contacted, qualified, unqualified, converted."
    • addedInput schema / properties / to / description
      Added value: +"Only leads created at or before this ISO 8601 timestamp (e.g. 2026-02-28T23:59:59Z)."
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), so the bar is lower. The description adds genuinely useful behavioral context beyond annotations: it returns summary rows rather than full lead detail, orders results newest-first, and discloses the pagination object shape. This is especially valuable given there is no output schema. Minor gaps like auth or rate limits are not disclosed, but they are low-stakes for 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 sentences, all load-bearing: the first states operation and filter scope, the second defines the return contract (fields, pagination, ordering), and the third points to the sibling for deeper detail. The content is front-loaded and there is zero filler.

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?

With 8 fully documented parameters, zero required fields, read-only annotations, and the missing output schema compensated by an explicit field list plus pagination shape, an agent has everything needed to call this tool correctly. The only minor gaps are empty-result and error behavior, which are low-stakes for a read-only list operation.

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 100%, with every one of the 8 parameters having its own description — stale's exact logic, source's pointer to list_lead_sources, from/to ISO examples, perPage bounds, status enum. This meets the high-coverage baseline of 3. The description adds only aggregate filtering context and ties filters to the response shape, but does not add per-parameter meaning beyond what the schema already provides.

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 opens with a specific verb+resource: 'List and search this workspace's leads', then enumerates exact filter dimensions (text/status/source/created-date/stale) and pagination. It specifies the output contract ('summary rows... plus pagination { page, perPage, total }'), default ordering ('newest first'), and explicitly differentiates from get_lead. This is unambiguous and clearly separates the tool from its 48 siblings.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool (workspace-wide lead list/search with filters) and explicitly routes single-lead detail retrieval to the sibling: 'Use get_lead to fetch notes, position and score for one lead by id.' It does not enumerate exclusions against the other search_* siblings, though resource-name differences (contacts, companies, deals, products) make those alternatives self-evident.

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