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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- elevenlabs_mcp/server.py:1128-1155 (handler)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}")
- elevenlabs_mcp/server.py:1128-1128 (registration)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")