Download Batch Results
deliveriq_batch_downloadDownload CSV results from a completed email batch verification job. Optionally filter by category: safe, risky, invalid, or unknown.
Instructions
Download the results of a completed batch verification job as CSV.
Args:
job_id (string): The completed job ID
category (string, optional): Filter to "safe", "risky", "invalid", or "unknown" only
Returns: CSV text with verification results. Large results may be truncated.
Examples:
"Download results for job abc123" -> { job_id: "abc123" }
"Get only safe emails from job abc123" -> { job_id: "abc123", category: "safe" }
Credit cost: Free
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | Batch job ID to download results for | |
| category | No | Filter results to a specific category (omit to get full CSV) |
Implementation Reference
- Handler function for deliveriq_batch_download tool. Calls client.batch.download(job_id, category) and returns the CSV result formatted as markdown.
// ── 4. deliveriq_batch_download ─────────────────────────────── server.registerTool( 'deliveriq_batch_download', { title: 'Download Batch Results', description: `Download the results of a completed batch verification job as CSV. Args: - job_id (string): The completed job ID - category (string, optional): Filter to "safe", "risky", "invalid", or "unknown" only Returns: CSV text with verification results. Large results may be truncated. Examples: - "Download results for job abc123" -> { job_id: "abc123" } - "Get only safe emails from job abc123" -> { job_id: "abc123", category: "safe" } Credit cost: Free`, inputSchema: BatchDownloadSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, }, async (params) => { try { const csv = await client.batch.download(params.job_id, params.category); const rowCount = csv.split('\n').length - 1; const header = `# Batch Results: ${params.job_id}${params.category ? ` (${params.category} only)` : ''}\n\n${rowCount} rows\n\n`; return successResponse(header + '```csv\n' + csv + '\n```'); } catch (error) { return handleSdkError(error); } }, ); - Zod input schema for deliveriq_batch_download: job_id (required string) and category (optional enum: safe/risky/invalid/unknown).
export const BatchDownloadSchema = z.object({ job_id: z.string().min(1) .describe('Batch job ID to download results for'), category: z.enum(['safe', 'risky', 'invalid', 'unknown']).optional() .describe('Filter results to a specific category (omit to get full CSV)'), }).strict(); - deliveriq-mcp/src/tools/verification.ts:229-265 (registration)Registration of deliveriq_batch_download via server.registerTool() with title, description, inputSchema, annotations, and handler callback.
server.registerTool( 'deliveriq_batch_download', { title: 'Download Batch Results', description: `Download the results of a completed batch verification job as CSV. Args: - job_id (string): The completed job ID - category (string, optional): Filter to "safe", "risky", "invalid", or "unknown" only Returns: CSV text with verification results. Large results may be truncated. Examples: - "Download results for job abc123" -> { job_id: "abc123" } - "Get only safe emails from job abc123" -> { job_id: "abc123", category: "safe" } Credit cost: Free`, inputSchema: BatchDownloadSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, }, async (params) => { try { const csv = await client.batch.download(params.job_id, params.category); const rowCount = csv.split('\n').length - 1; const header = `# Batch Results: ${params.job_id}${params.category ? ` (${params.category} only)` : ''}\n\n${rowCount} rows\n\n`; return successResponse(header + '```csv\n' + csv + '\n```'); } catch (error) { return handleSdkError(error); } }, ); - SDK Batch.download method — builds URL /verify/batch/{jobId}/download with optional category query param, calls http.getText() which returns the raw CSV string.
async download(jobId: string, category?: 'safe' | 'risky' | 'invalid' | 'unknown', opts?: RequestOptions): Promise<string> { const qs = category ? `?category=${category}` : ''; return this.http.getText(`/verify/batch/${enc(jobId)}/download${qs}`, opts); } - deliveriq-mcp/src/constants.ts:5-9 (helper)Credit cost definition: deliveriq_batch_download costs 0 credits (free).
export const CREDIT_COSTS: Record<string, number | string> = { deliveriq_verify_email: 1, deliveriq_batch_verify: '1 per email', deliveriq_batch_status: 0, deliveriq_batch_download: 0,