Export leads as CSV
lead_exportCaptured leads matching a filter, as a compact CSV block (one row per lead, one column per captured field). Filter by date range, agent, capture type, CRM sync status, origin, or a captured field's value (e.g. fieldKey City, fieldValue Pune). Capped at 500 rows; the reply says when it was cut short. Phone numbers appear in the same form as in the lead list. Read only.
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": "lead_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | No | ||
| agentId | No | Only leads captured by this agent (the agent's id) | |
| endDate | No | ISO date, inclusive | |
| maxRows | No | Most rows, default and maximum 500 | |
| fieldKey | No | A captured field name, e.g. "City" | |
| startDate | No | ISO date, inclusive | |
| fieldValue | No | The value that field must have; use with fieldKey | |
| syncStatus | No | CRM sync status, e.g. SYNCED, FAILED, NOT_CONFIGURED | |
| captureType | No |