Skip to main content
Glama

retell_create_batch_call

Schedule bulk outbound phone calls with AI agents by specifying caller number, recipient list, and optional start time.

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 logic for retell_create_batch_call tool: proxies arguments to POST /create-batch-call endpoint via retellRequest helper
    case "retell_create_batch_call":
      return retellRequest("/create-batch-call", "POST", args);
  • Input schema definition for the retell_create_batch_call tool, including parameters for from_number, tasks array, name, and trigger_timestamp
    {
      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"]
      }
    },
  • src/index.ts:1283-1285 (registration)
    Registration of the listTools handler that returns the tools array containing retell_create_batch_call
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Generic API request helper function used by all Retell tools, including authentication and error handling
    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();
    }
  • Helper function to retrieve Retell API key from environment variable, used by retellRequest
    function getApiKey(): string {
      const apiKey = process.env.RETELL_API_KEY;
      if (!apiKey) {
        throw new Error("RETELL_API_KEY environment variable is required");
      }
      return apiKey;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral context. 'Schedule' implies a future operation rather than immediate execution, and 'bulk' suggests multiple calls, but there's no information about permissions required, rate limits, cost implications, error handling, or what happens after scheduling (e.g., confirmation returned).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for what it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that schedules bulk operations with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., batch ID, status), how errors are handled, or any system constraints. Given the complexity of batch scheduling, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't clarify 'tasks' structure or 'trigger_timestamp' behavior). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Schedule') and resource ('bulk outbound phone calls'), making it immediately understandable. It doesn't explicitly distinguish from sibling tools like 'retell_create_phone_call' or 'retell_create_batch_test', but the 'bulk' aspect provides some implicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'retell_create_phone_call' (single call) and 'retell_create_batch_test' (likely test batch), there's no indication of when bulk scheduling is preferred or what prerequisites might be needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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