Skip to main content
Glama

retell_register_phone_call

Register inbound calls from custom telephony providers to connect callers with AI agents for handling conversations.

Instructions

Register an inbound call from a custom telephony provider.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to handle the call
from_numberYesThe caller's phone number
to_numberYesThe called number
metadataNoOptional metadata for the call

Implementation Reference

  • Handler implementation for the retell_register_phone_call tool. It invokes the generic retellRequest helper to POST to the Retell API endpoint /register-phone-call with the provided arguments.
    case "retell_register_phone_call":
      return retellRequest("/register-phone-call", "POST", args);
  • Input schema definition for the retell_register_phone_call tool, specifying required parameters: agent_id, from_number, to_number, and optional metadata.
    inputSchema: {
      type: "object",
      properties: {
        agent_id: {
          type: "string",
          description: "The agent ID to handle the call"
        },
        from_number: {
          type: "string",
          description: "The caller's phone number"
        },
        to_number: {
          type: "string",
          description: "The called number"
        },
        metadata: {
          type: "object",
          description: "Optional metadata for the call"
        }
      },
      required: ["agent_id", "from_number", "to_number"]
    }
  • src/index.ts:1091-1116 (registration)
    Tool definition and registration in the static tools array used for ListTools response.
    {
      name: "retell_register_phone_call",
      description: "Register an inbound call from a custom telephony provider.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "The agent ID to handle the call"
          },
          from_number: {
            type: "string",
            description: "The caller's phone number"
          },
          to_number: {
            type: "string",
            description: "The called number"
          },
          metadata: {
            type: "object",
            description: "Optional metadata for the call"
          }
        },
        required: ["agent_id", "from_number", "to_number"]
      }
    }
  • Generic helper function for making authenticated API requests to Retell AI, used by the tool handler.
    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();
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'register' suggests a write operation, it doesn't explain what happens after registration (e.g., does it initiate the call, create a call record, trigger notifications?), nor does it mention authentication requirements, rate limits, or error conditions.

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 that clearly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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

Completeness3/5

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

For a write operation with no annotations and no output schema, the description provides basic purpose but lacks important context about what happens after registration, expected responses, error handling, or integration specifics. It's minimally adequate but leaves significant gaps for a tool that creates/mutates call data.

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 fully documented in the schema. The description doesn't add any additional parameter context beyond what the schema provides, such as format requirements for phone numbers or examples of metadata usage. Baseline 3 is appropriate when 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 action ('register') and resource ('inbound call'), specifying it's for calls from custom telephony providers. It doesn't explicitly differentiate from sibling tools like 'retell_create_phone_call', but the focus on 'inbound' and 'custom telephony provider' provides reasonable distinction.

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

Usage Guidelines3/5

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

The description implies usage context ('inbound call from a custom telephony provider'), suggesting this is for integrating external phone systems rather than creating calls directly. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'retell_create_phone_call' or mention prerequisites.

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