Skip to main content
Glama

retell_create_web_call

Initiate a web call session with an AI agent by generating a call ID and access token for WebRTC connection setup.

Instructions

Create a new web call session. Returns a call ID and access token for establishing a WebRTC connection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to use for the web call
metadataNoOptional: Custom metadata to attach to the call
retell_llm_dynamic_variablesNoOptional: Dynamic variables to pass to the LLM

Implementation Reference

  • Handler case for retell_create_web_call tool. Makes a POST request to the Retell API's /v2/create-web-call endpoint using the generic retellRequest helper.
    case "retell_create_web_call":
      return retellRequest("/v2/create-web-call", "POST", args);
  • Input schema for retell_create_web_call defining required agent_id and optional metadata/llm variables.
    inputSchema: {
      type: "object",
      properties: {
        agent_id: {
          type: "string",
          description: "The agent ID to use for the web call"
        },
        metadata: {
          type: "object",
          description: "Optional: Custom metadata to attach to the call"
        },
        retell_llm_dynamic_variables: {
          type: "object",
          description: "Optional: Dynamic variables to pass to the LLM"
        }
      },
      required: ["agent_id"]
    }
  • src/index.ts:92-113 (registration)
    Tool registration in the tools array: defines name, description, and inputSchema for MCP tool listing.
    {
      name: "retell_create_web_call",
      description: "Create a new web call session. Returns a call ID and access token for establishing a WebRTC connection.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "The agent ID to use for the web call"
          },
          metadata: {
            type: "object",
            description: "Optional: Custom metadata to attach to the call"
          },
          retell_llm_dynamic_variables: {
            type: "object",
            description: "Optional: Dynamic variables to pass to the LLM"
          }
        },
        required: ["agent_id"]
      }
    },
  • Generic helper function used by all Retell tools to make authenticated API requests to Retell AI servers.
    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 to retrieve and validate the Retell API key from environment variable.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a session and returns a call ID and access token for WebRTC, which implies a write operation and output format. However, it lacks critical details: whether this requires authentication, rate limits, side effects (e.g., if it consumes resources), error conditions, or how the access token should be used. For a creation tool with zero annotation coverage, this is a significant gap.

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 two sentences with zero waste: the first states the purpose, and the second specifies the return values. It's front-loaded with the core action and efficiently conveys essential information without redundancy or fluff, making it easy for an agent to parse quickly.

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?

Given the tool's complexity (a creation operation with WebRTC integration) and lack of annotations and output schema, the description is minimally adequate. It covers the basic purpose and return values but misses behavioral context like authentication needs, error handling, or usage examples. Without an output schema, it should ideally describe the return structure more fully, but it does state the key outputs (call ID and access token), which provides some completeness.

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 the schema fully documents all three parameters (agent_id, metadata, retell_llm_dynamic_variables) with descriptions. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to.

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 ('Create a new web call session') and the resource ('web call'), which is specific and unambiguous. It distinguishes from siblings like 'retell_create_phone_call' by specifying 'web call' rather than phone-based alternatives. However, it doesn't explicitly differentiate from other creation tools like 'retell_create_chat' or 'retell_create_conversation_flow', which slightly limits sibling distinction.

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. It doesn't mention prerequisites (e.g., needing an existing agent), exclusions, or comparisons to sibling tools like 'retell_create_phone_call' or 'retell_create_chat'. The agent must infer usage from the tool name alone, which is insufficient for optimal selection.

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