Skip to main content
Glama

make_outbound_call

Initiate phone calls using an ElevenLabs AI agent to connect with phone numbers. Automatically selects the appropriate telephony provider (Twilio or SIP trunk) based on configuration.

Instructions

Make an outbound call using an ElevenLabs agent. Automatically detects provider type (Twilio or SIP trunk) and uses the appropriate API.

⚠️ COST WARNING: This tool makes an API call to ElevenLabs which may incur costs. Only use when explicitly requested by the user.

Args:
    agent_id: The ID of the agent that will handle the call
    agent_phone_number_id: The ID of the phone number to use for the call
    to_number: The phone number to call (E.164 format: +1xxxxxxxxxx)

Returns:
    TextContent containing information about the call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYes
agent_phone_number_idYes
to_numberYes

Implementation Reference

  • The handler function that implements the logic for making an outbound call using ElevenLabs API. Detects the provider type and invokes the appropriate outbound_call method.
    def make_outbound_call(
        agent_id: str,
        agent_phone_number_id: str,
        to_number: str,
    ) -> TextContent:
        # Get phone number details to determine provider type
        phone_number = _get_phone_number_by_id(agent_phone_number_id)
    
        if phone_number.provider.lower() == "twilio":
            response = client.conversational_ai.twilio.outbound_call(
                agent_id=agent_id,
                agent_phone_number_id=agent_phone_number_id,
                to_number=to_number,
            )
            provider_info = "Twilio"
        elif phone_number.provider.lower() == "sip_trunk":
            response = client.conversational_ai.sip_trunk.outbound_call(
                agent_id=agent_id,
                agent_phone_number_id=agent_phone_number_id,
                to_number=to_number,
            )
            provider_info = "SIP trunk"
        else:
            make_error(f"Unsupported provider type: {phone_number.provider}")
    
        return TextContent(
            type="text", text=f"Outbound call initiated via {provider_info}: {response}."
        )
  • Registers the 'make_outbound_call' tool using the @mcp.tool decorator, including detailed description, arguments, and usage warnings.
    @mcp.tool(
        description="""Make an outbound call using an ElevenLabs agent. Automatically detects provider type (Twilio or SIP trunk) and uses the appropriate API.
    
        ⚠️ COST WARNING: This tool makes an API call to ElevenLabs which may incur costs. Only use when explicitly requested by the user.
    
        Args:
            agent_id: The ID of the agent that will handle the call
            agent_phone_number_id: The ID of the phone number to use for the call
            to_number: The phone number to call (E.164 format: +1xxxxxxxxxx)
    
        Returns:
            TextContent containing information about the call
        """
    )
  • Supporting helper function that retrieves phone number details by ID from the ElevenLabs client, used by the handler to determine the provider type.
    def _get_phone_number_by_id(phone_number_id: str):
        """Helper function to get phone number details by ID."""
        phone_numbers = client.conversational_ai.phone_numbers.list()
        for phone in phone_numbers:
            if phone.phone_number_id == phone_number_id:
                return phone
        make_error(f"Phone number with ID {phone_number_id} not found.")
Behavior3/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. It discloses key behavioral traits: automatic provider detection (Twilio/SIP trunk), cost implications, and that it returns text content. However, it lacks details on error handling, rate limits, authentication needs, or what specific information is returned, leaving gaps for a mutation tool.

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 well-structured and appropriately sized. It front-loads the core purpose, includes a critical warning, and then clearly lists args and returns. Every sentence adds value with no redundancy or fluff.

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 no annotations and no output schema, the description provides adequate basics (purpose, parameters, cost warning) but is incomplete for a mutation tool. It lacks details on side effects, error cases, return structure, or prerequisites, leaving the agent with significant unknowns about behavioral outcomes.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics for all 3 parameters: agent_id ('ID of the agent that will handle the call'), agent_phone_number_id ('ID of the phone number to use'), and to_number ('phone number to call in E.164 format'). This goes beyond the bare schema, but doesn't explain parameter interactions or constraints like valid ID formats.

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: 'Make an outbound call using an ElevenLabs agent.' It specifies the verb ('Make'), resource ('outbound call'), and technology context ('ElevenLabs agent'). However, it doesn't explicitly differentiate from sibling tools like 'play_audio' or 'text_to_speech' that might involve audio/call functionality, so it doesn't reach a perfect 5.

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

Usage Guidelines4/5

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

The description provides clear usage context with the cost warning: 'Only use when explicitly requested by the user.' This gives explicit guidance on when to use the tool. However, it doesn't mention when NOT to use it or name specific alternatives among the siblings, so it falls short of a 5.

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/projectservan8n/elevenlabs-mcp'

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