Skip to main content
Glama

retell_create_agent

Create a voice agent by configuring voice, language, LLM engine, and behavior settings for AI phone or chat interactions.

Instructions

Create a new voice agent with specified configuration including voice, LLM engine, and behavior settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
voice_idYesThe voice ID to use for the agent (use retell_list_voices to see available voices)
response_engineYesThe LLM engine configuration. Use type: 'retell-llm' with llm_id, or type: 'conversation-flow' with conversation_flow_id
agent_nameNoOptional: Display name for the agent
languageNoLanguage code (e.g., 'en-US', 'es-ES', 'multi' for multilingual)
voice_modelNoText-to-speech model to use
voice_temperatureNoVoice naturalness (0-2, default 1)
voice_speedNoSpeech rate (0.5-2, default 1)
interruption_sensitivityNoHow sensitive to user interruptions (0-1)
enable_backchannelNoEnable conversational acknowledgments like 'uh-huh', 'I see'
end_call_after_silence_msNoMilliseconds of silence before ending call
max_call_duration_msNoMaximum call duration in milliseconds
webhook_urlNoURL for receiving call event webhooks

Implementation Reference

  • Switch case in executeTool function that dispatches the retell_create_agent tool execution by calling the retellRequest helper with the Retell API endpoint for creating an agent.
    case "retell_create_agent":
      return retellRequest("/create-agent", "POST", args);
  • Input schema definition for the retell_create_agent tool, specifying parameters like voice_id, response_engine, agent_name, etc., used for validation.
    inputSchema: {
      type: "object",
      properties: {
        voice_id: {
          type: "string",
          description: "The voice ID to use for the agent (use retell_list_voices to see available voices)"
        },
        response_engine: {
          type: "object",
          description: "The LLM engine configuration. Use type: 'retell-llm' with llm_id, or type: 'conversation-flow' with conversation_flow_id",
          properties: {
            type: {
              type: "string",
              enum: ["retell-llm", "custom-llm", "conversation-flow"],
              description: "The type of response engine"
            },
            llm_id: {
              type: "string",
              description: "The LLM ID (for retell-llm type)"
            },
            conversation_flow_id: {
              type: "string",
              description: "The conversation flow ID (for conversation-flow type)"
            }
          },
          required: ["type"]
        },
        agent_name: {
          type: "string",
          description: "Optional: Display name for the agent"
        },
        language: {
          type: "string",
          description: "Language code (e.g., 'en-US', 'es-ES', 'multi' for multilingual)"
        },
        voice_model: {
          type: "string",
          enum: ["eleven_turbo_v2", "eleven_flash_v2", "eleven_flash_v2_5", "tts-1", "gpt-4o-mini-tts", "azure", "deepgram", "smallest-ai"],
          description: "Text-to-speech model to use"
        },
        voice_temperature: {
          type: "number",
          description: "Voice naturalness (0-2, default 1)"
        },
        voice_speed: {
          type: "number",
          description: "Speech rate (0.5-2, default 1)"
        },
        interruption_sensitivity: {
          type: "number",
          description: "How sensitive to user interruptions (0-1)"
        },
        enable_backchannel: {
          type: "boolean",
          description: "Enable conversational acknowledgments like 'uh-huh', 'I see'"
        },
        end_call_after_silence_ms: {
          type: "integer",
          description: "Milliseconds of silence before ending call"
        },
        max_call_duration_ms: {
          type: "integer",
          description: "Maximum call duration in milliseconds"
        },
        webhook_url: {
          type: "string",
          description: "URL for receiving call event webhooks"
        }
      },
      required: ["voice_id", "response_engine"]
    }
  • src/index.ts:430-503 (registration)
    Tool registration object in the tools array, defining name, description, and inputSchema for listing via ListToolsRequestSchema.
      name: "retell_create_agent",
      description: "Create a new voice agent with specified configuration including voice, LLM engine, and behavior settings.",
      inputSchema: {
        type: "object",
        properties: {
          voice_id: {
            type: "string",
            description: "The voice ID to use for the agent (use retell_list_voices to see available voices)"
          },
          response_engine: {
            type: "object",
            description: "The LLM engine configuration. Use type: 'retell-llm' with llm_id, or type: 'conversation-flow' with conversation_flow_id",
            properties: {
              type: {
                type: "string",
                enum: ["retell-llm", "custom-llm", "conversation-flow"],
                description: "The type of response engine"
              },
              llm_id: {
                type: "string",
                description: "The LLM ID (for retell-llm type)"
              },
              conversation_flow_id: {
                type: "string",
                description: "The conversation flow ID (for conversation-flow type)"
              }
            },
            required: ["type"]
          },
          agent_name: {
            type: "string",
            description: "Optional: Display name for the agent"
          },
          language: {
            type: "string",
            description: "Language code (e.g., 'en-US', 'es-ES', 'multi' for multilingual)"
          },
          voice_model: {
            type: "string",
            enum: ["eleven_turbo_v2", "eleven_flash_v2", "eleven_flash_v2_5", "tts-1", "gpt-4o-mini-tts", "azure", "deepgram", "smallest-ai"],
            description: "Text-to-speech model to use"
          },
          voice_temperature: {
            type: "number",
            description: "Voice naturalness (0-2, default 1)"
          },
          voice_speed: {
            type: "number",
            description: "Speech rate (0.5-2, default 1)"
          },
          interruption_sensitivity: {
            type: "number",
            description: "How sensitive to user interruptions (0-1)"
          },
          enable_backchannel: {
            type: "boolean",
            description: "Enable conversational acknowledgments like 'uh-huh', 'I see'"
          },
          end_call_after_silence_ms: {
            type: "integer",
            description: "Milliseconds of silence before ending call"
          },
          max_call_duration_ms: {
            type: "integer",
            description: "Maximum call duration in milliseconds"
          },
          webhook_url: {
            type: "string",
            description: "URL for receiving call event webhooks"
          }
        },
        required: ["voice_id", "response_engine"]
      }
    },
  • Generic helper function that makes authenticated HTTP requests to the Retell AI API, used by the tool handler to perform the actual agent creation.
    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 the 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 the full burden of behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't address critical behavioral aspects: whether this requires specific permissions, what happens on success/failure, if there are rate limits, whether the agent is immediately usable, or what the return value contains. This leaves significant gaps for a creation tool.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core action ('Create a new voice agent') and mentions key configuration areas. There's no wasted verbiage, though it could potentially benefit from slightly more detail given the tool's complexity.

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 creation tool with 12 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what happens after creation, whether the agent is active immediately, what permissions are needed, or what the return structure looks like. The agent needs more context about the operational implications of creating a voice agent.

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?

The schema description coverage is 100%, so the schema already documents all 12 parameters thoroughly. The description adds minimal value beyond the schema by mentioning 'voice, LLM engine, and behavior settings' which loosely corresponds to some parameters, but doesn't provide additional semantic context, constraints, or relationships between parameters beyond what's in the schema descriptions.

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 voice agent') and specifies key configuration elements ('voice, LLM engine, and behavior settings'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'retell_create_chat_agent' or 'retell_create_phone_call', which appear to create different types of agents.

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 like 'retell_create_chat_agent' or 'retell_create_phone_call'. It mentions configuration elements but doesn't specify prerequisites, constraints, or appropriate contexts for creating a voice agent versus other agent types.

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