list_phone_numbers
Retrieve all phone numbers linked to your ElevenLabs account for managing call settings or verifying ownership.
Instructions
List all phone numbers associated with the ElevenLabs account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| text | Yes | ||
| annotations | No | ||
| _meta | No |
Implementation Reference
- elevenlabs_mcp/server.py:1158-1161 (registration)Registration of the 'list_phone_numbers' tool via @mcp.tool decorator with readOnlyHint and description.
@mcp.tool( annotations=ToolAnnotations(readOnlyHint=True, openWorldHint=True), description="List all phone numbers associated with the ElevenLabs account" ) - elevenlabs_mcp/server.py:1162-1188 (handler)Handler function that calls client.conversational_ai.phone_numbers.list() and formats the results.
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}")