export_leads
Full-fidelity export of leads for offline analysis / backup. Returns { leads, count, limit, offset }. Each lead has ALL its columns, ai_memory[] (every AI-memory item attached to the lead — all categories, full untruncated content, newest first), and (unless disabled) nested contact and account objects. Same filters as list_leads. Paginate with limit (≤100) + offset — the whole base pulls in ceil(total/100) calls. Prefer this over list_leads when you need the complete data (list_leads trims memory for size).
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": "export_leads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows (default 20, max 100) | |
| 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"] }. | |
| offset | No | Pagination offset (default 0) | |
| search | No | Free-text search term | |
| status | No | Only entries with this status | |
| category | No | Exact category match (case-insensitive) | |
| order_by | No | score | last_activity | created | |
| owner_id | No | ID of the owner (user) | |
| min_score | No | Only export 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 | |
| include_account | No | Nest the lead's account (default true) | |
| include_contact | No | Nest the lead's contact (default true) |