remove_purchased_did
Remove a purchased Direct Inward Dialing (DID) number from a DIDLogic account by specifying the number in E164 format. Returns detailed information about the removed DID, including ID, number, country, activation cost, and SIP codec.
Instructions
Remove DID from DIDLogic account
Args: number: DID number for removing in E164 format
Returns a JSON object with removed DID details where: dids: Array of removed dids where: id: ID of purchased DID number: number of DID country: Country name area: City name sms_enabled: Is number capable of receiving SMS channels: How many parallel channels have DID free_minutes: How many free minutes per month DID have activation: Activation cost for DID in USD monthly_fee: Monthly fee for DID per_minute: Per minute cost for DID origination_per_min: per minute cost if origin based rate applied requir_docs: required documents for activating number, where: 1 = Any form of ID 2 = Proof of address 3 = Proof of local address codec: what SIP codec is preferred for this number
Example:
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | Number for remove from DIDLogic account |
Implementation Reference
- The core handler function decorated with @mcp.tool(), implementing the logic to remove a purchased DID by sending a DELETE request to the DIDLogic purchase endpoint.@mcp.tool() async def remove_purchased_did( ctx: Context, number: str | int = Field( description="Number for remove from DIDLogic account" ) ) -> str: """ Remove DID from DIDLogic account Args: number: DID number for removing in E164 format Returns a JSON object with removed DID details where: dids: Array of removed dids where: id: ID of purchased DID number: number of DID country: Country name area: City name sms_enabled: Is number capable of receiving SMS channels: How many parallel channels have DID free_minutes: How many free minutes per month DID have activation: Activation cost for DID in USD monthly_fee: Monthly fee for DID per_minute: Per minute cost for DID origination_per_min: per minute cost if origin based rate applied requir_docs: required documents for activating number, where: 1 = Any form of ID 2 = Proof of address 3 = Proof of local address codec: what SIP codec is preferred for this number Example: ``` { "dids": [ { "id": 728070, "number": "17806999999", "sms_enabled": false, "no_local_cli": false, "channels": 4, "country": "Canada", "area": "Edmonton, AB", "free_minutes": 0, "codec": "G711", "require_docs": "", "activation": 1.0, "monthly_fee": 1.0, "per_minute": 0.01, "origination_per_min": 0.0 } ] } ``` """ response = await base.call_didlogic_api( ctx, "DELETE", "/v2/buy/purchase", data={"did_numbers": number} ) return response.text
- src/didlogic_mcp/server.py:99-105 (registration)Server-wide registration of all tool modules, including 'tools.purchase.register_tools(mcp)' on line 103, which registers the 'remove_purchased_did' tool.tools.balance.register_tools(mcp) tools.sip_accounts.register_tools(mcp) tools.allowed_ips.register_tools(mcp) tools.purchases.register_tools(mcp) tools.purchase.register_tools(mcp) tools.calls.register_tools(mcp) tools.transactions.register_tools(mcp)