Skip to main content
Glama
elevenlabs

ElevenLabs MCP Server

Official
by elevenlabs

list_phone_numbers

Retrieve all phone numbers linked to your ElevenLabs account for managing voice services and communication settings.

Instructions

List all phone numbers associated with the ElevenLabs account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'list_phone_numbers' tool. It is registered via the @mcp.tool decorator. Fetches phone numbers from the ElevenLabs client API and returns formatted text content listing them with details like ID, provider, label, and assigned agent.
    @mcp.tool(description="List all phone numbers associated with the ElevenLabs account") def list_phone_numbers() -> TextContent: """List all phone numbers associated with the ElevenLabs account. Returns: TextContent containing formatted information about the phone numbers """ response = client.conversational_ai.phone_numbers.list() if not response: return TextContent(type="text", text="No phone numbers found.") phone_info = [] for phone in response: assigned_agent = "None" if phone.assigned_agent: assigned_agent = f"{phone.assigned_agent.agent_name} (ID: {phone.assigned_agent.agent_id})" phone_info.append( f"Phone Number: {phone.phone_number}\n" f"ID: {phone.phone_number_id}\n" f"Provider: {phone.provider}\n" f"Label: {phone.label}\n" f"Assigned Agent: {assigned_agent}" ) formatted_info = "\n\n".join(phone_info) return TextContent(type="text", text=f"Phone Numbers:\n\n{formatted_info}")
  • Registration of the 'list_phone_numbers' tool using the @mcp.tool decorator in the server.py file.
    @mcp.tool(description="List all phone numbers associated with the ElevenLabs account")

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

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