retell_update_phone_number
Modify phone number settings in Retell AI, including assigned agents for inbound and outbound calls, and update the nickname.
Instructions
Update settings for a phone number including assigned agents.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone_number | Yes | The phone number in E.164 format to update | |
| inbound_agent_id | No | New agent ID for inbound calls (null to remove) | |
| outbound_agent_id | No | New agent ID for outbound calls (null to remove) | |
| nickname | No | New nickname for the phone number |
Implementation Reference
- src/index.ts:361-386 (registration)Tool registration in the tools array, defining name, description, and input schema for retell_update_phone_number{ name: "retell_update_phone_number", description: "Update settings for a phone number including assigned agents.", inputSchema: { type: "object", properties: { phone_number: { type: "string", description: "The phone number in E.164 format to update" }, inbound_agent_id: { type: "string", description: "New agent ID for inbound calls (null to remove)" }, outbound_agent_id: { type: "string", description: "New agent ID for outbound calls (null to remove)" }, nickname: { type: "string", description: "New nickname for the phone number" } }, required: ["phone_number"] } },
- src/index.ts:364-385 (schema)Input schema definition for validating tool argumentsinputSchema: { type: "object", properties: { phone_number: { type: "string", description: "The phone number in E.164 format to update" }, inbound_agent_id: { type: "string", description: "New agent ID for inbound calls (null to remove)" }, outbound_agent_id: { type: "string", description: "New agent ID for outbound calls (null to remove)" }, nickname: { type: "string", description: "New nickname for the phone number" } }, required: ["phone_number"] }
- src/index.ts:1159-1162 (handler)Handler logic in executeTool switch statement: extracts phone_number from args, encodes it, and sends PATCH request to Retell API's /update-phone-number endpoint with remaining update data.case "retell_update_phone_number": { const { phone_number, ...phoneUpdateData } = args; return retellRequest(`/update-phone-number/${encodeURIComponent(phone_number as string)}`, "PATCH", phoneUpdateData as Record<string, unknown>); }