delete_destination
Remove a specified destination from a DID number. Use this tool to eliminate unwanted routing by providing the DID number and destination ID, ensuring accurate call management.
Instructions
Remove destination from DID.
Args: number: DID number in DIDLogic id: destination ID to remove
Returns a Destination deleted on success
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Destination ID from list_destinations | |
| number | Yes | DID Number |
Implementation Reference
- The handler function for the 'delete_destination' tool. It is decorated with @mcp.tool() which also serves as registration. Deletes a specific destination (by ID) for a given DID number via the DIDLogic API DELETE request to /v1/purchases/{number}/destinations/{id}. The input schema is defined inline using Pydantic Field for 'number' and 'id' parameters.@mcp.tool() async def delete_destination( ctx: Context, number: str | int = Field( description="DID Number"), id: int = Field( description="Destination ID from list_destinations")) -> str: """ Remove destination from DID. Args: number: DID number in DIDLogic id: destination ID to remove Returns a `Destination deleted` on success """ await base.call_didlogic_api( ctx, "DELETE", f"/v1/purchases/{number}/destinations/{id}" ) return "Destination deleted"