> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview Batch Call Leads

> Use the preview_batch_call_leads MCP tool on the DialNexa remote MCP server.

<span data-api-safety-label="read-only"><Badge color="gray" size="sm" shape="pill">Read only</Badge></span>

Parses a small CSV/Excel leads file WITHOUT creating anything — same preview/validation the dashboard's batch call upload wizard runs before letting a batch start. Returns how many rows are valid vs. invalid, and for each invalid row, which phone number failed and why (bad country code, invalid length, destination not allowed by this org's calling rules, etc.). Use this on the file before create\_batch\_call: if invalid\_row\_count > 0, show the user the specific bad rows, get them fixed or dropped, then call create\_batch\_call with the corrected file. Same file\_base64 size limit as create\_batch\_call (a few dozen rows).

## Parameters

| Name                   | Type     | Required | Description                                                                                                                       |
| ---------------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `agent_id`             | `string` | Yes      | The agent ID the batch would use, e.g. agent\_abc123 — needed to resolve which org phone number/calling rules to validate against |
| `agent_version_number` | `string` | Yes      | The specific published agent version — same requirement as create\_batch\_call                                                    |
| `file_name`            | `string` | Yes      | File name with extension, e.g. leads.csv or leads.xlsx                                                                            |
| `file_base64`          | `string` | Yes      | Base64-encoded content of a small (few dozen rows) CSV/Excel leads file                                                           |

## Before you call

* Connect and initialize the MCP client with OAuth or an API key for the intended workspace.
* Provide the required parameters: `agent_id`, `agent_version_number`, `file_name`, `file_base64`.

## Example MCP request

Send `tools/call` after your client completes MCP initialization. Replace placeholder values with IDs and inputs from your workspace. For object and array parameters, follow the nested requirements in the parameter description instead of treating an empty value as complete.

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "preview_batch_call_leads",
    "arguments": {
      "agent_id": "agent_abc123",
      "agent_version_number": "1",
      "file_name": "VALUE",
      "file_base64": "BASE64_ENCODED_CSV"
    }
  }
}
```

The server returns one text content block. Parse `content[0].text` as JSON when the tool succeeds. See [MCP responses and errors](/docs/mcp-tools/errors) for the full envelope and failure behavior.

## Verify the result

Confirm the response is not marked `isError`, parse `content[0].text` as JSON, and verify that returned IDs and workspace data match the request.

## Retry safety

This tool does not change workspace data. Retrying after a transient transport failure is safe.

## Related MCP tools

* [Create Batch Call](/docs/mcp-tools/batch-calls/create-batch-call): `create_batch_call`

## Related guides

* [Connect to the DialNexa MCP server](/docs/mcp-tools/overview)
* [Batch Calls MCP tools](/docs/mcp-tools/batch-calls/overview)
* [MCP responses and errors](/docs/mcp-tools/errors)
