count_leads
Return { count } — the TOTAL number of leads matching a filter, without fetching any rows. Accepts the exact same filters as list_leads (search, category, status, campaign_id, no_campaign, owner_id, min_score, stale_days). Use this to size a segment before listing/exporting (e.g. how many stale leads, how many in a campaign).
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": "count_leads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| custom | No | Filter on lead custom fields (list_custom_fields entity 'leads'): { key: value } — value = equals (multiselect: contains), array = any of (multiselect: contains all), null = empty. E.g. { "stufe": "A", "marken": ["KTM"] }. | |
| search | No | Free-text search term | |
| status | No | Only entries with this status | |
| category | No | Exact category match (case-insensitive) | |
| owner_id | No | ID of the owner (user) | |
| min_score | No | Only count leads with at least this score (0-100) | |
| stale_days | No | Only leads whose last activity is older than N days | |
| campaign_id | No | ID of the campaign | |
| no_campaign | No | Only leads not assigned to any campaign |