Skip to main content
Glama

search_leads

Search and filter CRM leads using specific criteria to find relevant records. Apply filters based on field types and operators, with support for pagination and sorting.

Instructions

Search/filter leads. Only fields marked [FILTERABLE] in get_lead_field_instructions can be used. Call get_lead_field_instructions first to get filterable fields and their types.

filters: List of filter objects. Each must have:

  • field (str): Field internal/API name (e.g. firstName, country, source, createdAt).

  • operator (str): One of the allowed operators for that field type (e.g. equal, contains, greater).

  • value: Value to compare. For PICK_LIST/MULTI_PICKLIST use Option ID (number), except requirementCurrency, companyBusinessType, country, timezone, companyIndustry — use internal name (string). For date/datetime (incl. custom e.g. cfDateField): value null for today/is_null/is_not_null; single ISO string for greater/greater_or_equal/less/less_or_equal e.g. "2026-02-02T18:30:00.000Z"; for between use [startISO, endISO].

  • timeZone (str, optional): For date/datetime filters only; default from server or env.

  • type (str, optional): Field type from cheat sheet. If omitted, inferred from schema. For user look-up fields (createdBy, updatedBy, convertedBy, ownerId, importedBy): value must be user ID (number). Call lookup_users first. For the products field: value must be product ID (number). Call lookup_products first; if multiple matches, ask which product, then use that ID here. For pipeline / pipelineStage (e.g. open leads, closed leads): call lookup_pipelines first, ask the user to confirm which pipeline, then call get_pipeline_stages for that pipeline only; if stage is ambiguous ask which stage, then use pipeline + pipelineStage filters here. page: 0-based page (default 0). size: Page size, max 100 (default 20). sort: Sort e.g. "createdAt,desc" (default).

Operators by type (examples): TEXT_FIELD: equal, contains, is_empty. NUMBER: equal, greater, between, is_null. PICK_LIST: equal, in, is_null. DATETIME_PICKER: today, yesterday, between, is_not_null, greater, less, current_week, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersYes
pageNo
sizeNo
sortNocreatedAt,desc

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/akshaykylas94/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server