Skip to main content
Glama

retell_create_batch_call

Schedule multiple outbound phone calls simultaneously by specifying caller number, recipient numbers, and optional metadata for bulk communication tasks.

Instructions

Schedule bulk outbound phone calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_numberYesThe caller's phone number
tasksYesArray of call tasks with to_number and optional metadata
nameNoName for the batch job
trigger_timestampNoUnix timestamp to start the batch (optional, starts immediately if not set)

Implementation Reference

  • Handler implementation in the executeTool function's switch statement. It forwards the tool arguments to the Retell API endpoint /create-batch-call using a POST request.
    case "retell_create_batch_call": return retellRequest("/create-batch-call", "POST", args);
  • Input schema defining the parameters for the retell_create_batch_call tool, including from_number, tasks array, optional name and trigger_timestamp.
    inputSchema: { type: "object", properties: { from_number: { type: "string", description: "The caller's phone number" }, tasks: { type: "array", description: "Array of call tasks with to_number and optional metadata", items: { type: "object", properties: { to_number: { type: "string" }, metadata: { type: "object" }, retell_llm_dynamic_variables: { type: "object" } }, required: ["to_number"] } }, name: { type: "string", description: "Name for the batch job" }, trigger_timestamp: { type: "integer", description: "Unix timestamp to start the batch (optional, starts immediately if not set)" } }, required: ["from_number", "tasks"] }
  • src/index.ts:1028-1062 (registration)
    Tool definition and registration in the static tools array, which is returned by the ListToolsRequestHandler.
    { name: "retell_create_batch_call", description: "Schedule bulk outbound phone calls.", inputSchema: { type: "object", properties: { from_number: { type: "string", description: "The caller's phone number" }, tasks: { type: "array", description: "Array of call tasks with to_number and optional metadata", items: { type: "object", properties: { to_number: { type: "string" }, metadata: { type: "object" }, retell_llm_dynamic_variables: { type: "object" } }, required: ["to_number"] } }, name: { type: "string", description: "Name for the batch job" }, trigger_timestamp: { type: "integer", description: "Unix timestamp to start the batch (optional, starts immediately if not set)" } }, required: ["from_number", "tasks"] } },
  • Shared helper function that performs authenticated HTTP requests to the Retell API, used by all tool handlers including retell_create_batch_call.
    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(); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itsanamune/retellsimp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server