retell_create_batch_test
Run automated test scenarios against a Retell AI agent to validate performance and conversation flows.
Instructions
Run automated test scenarios against an agent.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | The agent ID to test | |
| test_cases | Yes | Array of test case configurations |
Implementation Reference
- src/index.ts:1063-1080 (schema)Schema definition for the retell_create_batch_test tool, including input schema for agent_id and test_cases.{ name: "retell_create_batch_test", description: "Run automated test scenarios against an agent.", inputSchema: { type: "object", properties: { agent_id: { type: "string", description: "The agent ID to test" }, test_cases: { type: "array", description: "Array of test case configurations" } }, required: ["agent_id", "test_cases"] } },
- src/index.ts:1255-1256 (handler)Handler case in executeTool function that executes the tool by calling retellRequest to the /create-batch-test API endpoint.case "retell_create_batch_test": return retellRequest("/create-batch-test", "POST", args);
- src/index.ts:23-57 (helper)Generic retellRequest helper function that performs authenticated API calls to Retell AI backend, used by all tool handlers.async function retellRequest( endpoint: string, method: string = "GET", body?: Record<string, unknown> ): Promise<unknown> { const apiKey = getApiKey(); const headers: Record<string, string> = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", }; const options: RequestInit = { method, headers, }; if (body && method !== "GET") { options.body = JSON.stringify(body); } const response = await fetch(`${RETELL_API_BASE}${endpoint}`, options); if (!response.ok) { const errorText = await response.text(); throw new Error(`Retell API error (${response.status}): ${errorText}`); } // Handle 204 No Content if (response.status === 204) { return { success: true }; } return response.json(); }
- src/index.ts:1283-1285 (registration)Registration of the tool list handler, which exposes the tools array (including retell_create_batch_test) via MCP ListToolsRequest.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });