list_phone_numbers
Retrieve all phone numbers linked to your ElevenLabs account for authentication and account management purposes.
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:1069-1096 (handler)The main handler function for the 'list_phone_numbers' MCP tool. It fetches the list of phone numbers using the ElevenLabs client API, formats the information including phone number, ID, provider, label, and assigned agent, and returns it as TextContent. The @mcp.tool decorator registers the tool and defines its description (schema implicitly from function signature).@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}")