Skip to main content
Glama

list_destinations

Retrieve and manage DID destinations via JSON output, including ID, destination, priority, callhunt status, activation, and transport type.

Instructions

List DID destination.

Args: number: DID number in DIDLogic

Returns a JSON object with all did destinations where: id: ID of destination destination: destination priority: priority of selection callhunt: flag indicates do destination is part of ring all group active: flag indicates is destination enabled or not transport: transport of destination where: 1 = SIP address destination (ex: 123@example.com) 4 = PSTN (phone number) destination (ex: 15551231233) 5 = SIP account destination (ex: 12345)

Example:

{ "destination": [ { "id": 1234455, "destination": "12345", "priority": 1, "callhunt": false, "active": true, "transport": 5 } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesDID Number

Implementation Reference

  • The core handler function for the 'list_destinations' tool. It takes a DID number and retrieves the list of destinations via the DIDLogic API using the base helper. The @mcp.tool() decorator handles registration.
    @mcp.tool() async def list_destinations( ctx: Context, number: str | int = Field(description="DID Number") ) -> str: """ List DID destination. Args: number: DID number in DIDLogic Returns a JSON object with all did destinations where: id: ID of destination destination: destination priority: priority of selection callhunt: flag indicates do destination is part of ring all group active: flag indicates is destination enabled or not transport: transport of destination where: 1 = SIP address destination (ex: 123@example.com) 4 = PSTN (phone number) destination (ex: 15551231233) 5 = SIP account destination (ex: 12345) Example: ``` { "destination": [ { "id": 1234455, "destination": "12345", "priority": 1, "callhunt": false, "active": true, "transport": 5 } ] } ``` """ response = await base.call_didlogic_api( ctx, "GET", f"/v1/purchases/{number}/destinations" ) return response.text
  • Top-level registration call that invokes register_tools on the purchases module, thereby registering the list_destinations tool among others.
    tools.purchases.register_tools(mcp)
  • Uses the base.call_didlogic_api helper function to perform the API call for listing destinations.
    response = await base.call_didlogic_api( ctx, "GET", f"/v1/purchases/{number}/destinations" ) return response.text

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/UserAd/didlogic_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server