didlogic_mcp

UserAd/didlogic_mcp

3.2

If you are the rightful owner of didlogic_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server implementation for the Didlogic API, enabling LLMs to interact with Didlogic services through a standardized interface.

Tools

Functions exposed to the LLM to take actions

get_balance

Get the current DIDLogic account balance

Returns a JSON object with balance in USD Example output: {"balance": 35.22}

list_sip_accounts

List all SIP accounts

Returns a JSON object with all SIP accounts where: id: ID of SIP account name: SIP account name (login) callerid: CallerID associated with this SIP account label: label fot this SIP account charge: charge for calls on this month talk_time: total talk time for this month rewrite_enabled: do SIP account have calling number rewriting rule rewrite_cond: prefix to be rewrited (ex: 00) rewrite_prefix: prefix to what should be rewritten (ex: 44) didinfo_enabled: do DIDLogic will attempt send DID number as TO when receiving calls to this account ip_restrict: do we need to allowlist IP addresses for this account allowed_ips: IP addresses allowed for this SIP account call_restrict: flag indicates what SIP account should have maximum call time call_limit: maximum call duration in seconds channels_restrict: flag indicates what SIP account should have maximum channels limit max_channels: maximum sip channels cost_limit: flag indicates what SIP account should have maximum call cost max_call_cost: maximum call cost for this SIP account created_at: date of creation this SIP account

Example:

{
    "sipaccounts": [
        {
            "id": 61,
            "name": "12345",
            "callerid": "17254999999",
            "label": "TEST DEVICE",
            "host": "dynamic",
            "charge": "0.0",
            "talk_time": 0,
            "rewrite_enabled": false,
            "rewrite_cond": "8",
            "rewrite_prefix": "7",
            "didinfo_enabled": false,
            "ip_restrict": false,
            "call_restrict": true,
            "call_limit": 2800,
            "channels_restrict": false,
            "max_channels": 1,
            "cost_limit": false,
            "max_call_cost": "5.0",
            "created_at": "2024-06-03 06:06:47 UTC",
            "allowed_ips": ["1.2.3.4", "3.4.5.6"]
        }
    ]
}

get_sip_account

Get details about SIP account

Args: name: SIP account name

Returns a JSON object with SIP account details where: id: ID of SIP account name: SIP account name (login) callerid: CallerID associated with this SIP account label: label fot this SIP account charge: charge for calls on this month talk_time: total talk time for this month rewrite_enabled: do SIP account have calling number rewriting rule rewrite_cond: prefix to be rewrited (ex: 00) rewrite_prefix: prefix to what should be rewritten (ex: 44) didinfo_enabled: do DIDLogic will attempt send DID number as TO when receiving calls to this account ip_restrict: do we need to allowlist IP addresses for this account allowed_ips: IP addresses allowed for this SIP account call_restrict: flag indicates what SIP account should have maximum call time call_limit: maximum call duration in seconds channels_restrict: flag indicates what SIP account should have maximum channels limit max_channels: maximum sip channels cost_limit: flag indicates what SIP account should have maximum call cost max_call_cost: maximum call cost for this SIP account created_at: date of creation this SIP account

Example:

{
    "sipaccount": {
        "id": 61,
        "name": "12345",
        "callerid": "17254999999",
        "label": "TEST DEVICE",
        "host": "dynamic",
        "charge": "0.0",
        "talk_time": 0,
        "rewrite_enabled": false,
        "rewrite_cond": "8",
        "rewrite_prefix": "7",
        "didinfo_enabled": false,
        "ip_restrict": false,
        "call_restrict": true,
        "call_limit": 2800,
        "channels_restrict": false,
        "max_channels": 1,
        "cost_limit": false,
        "max_call_cost": "5.0",
        "created_at": "2024-06-03 06:06:47 UTC",
        "allowed_ips": ["1.2.3.4", "3.4.5.6"]
    }
}

create_sip_account

Creates a new SIP account

Args: password: Password to be used for this SIP account callerid: CallerID associated with this SIP account label: label fot this SIP account rewrite_enabled: do SIP account have calling number rewriting rule rewrite_cond: prefix to be rewrited (ex: 00) rewrite_prefix: prefix to what should be rewritten (ex: 44) didinfo_enabled: do DIDLogic will attempt send DID number as TO when receiving calls to this account ip_restrict: do we need to allowlist IP addresses for this account call_restrict: flag indicates what SIP account should have maximum call time call_limit: maximum call duration in seconds channels_restrict: flag indicates what SIP account should have maximum channels limit max_channels: maximum sip channels cost_limit: flag indicates what SIP account should have maximum call cost max_call_cost: maximum call cost for this SIP account

Returns a JSON object with SIP account details where: id: ID of SIP account name: SIP account name (login) callerid: CallerID associated with this SIP account label: label fot this SIP account charge: charge for calls on this month talk_time: total talk time for this month rewrite_enabled: do SIP account have calling number rewriting rule rewrite_cond: prefix to be rewrited (ex: 00) rewrite_prefix: prefix to what should be rewritten (ex: 44) didinfo_enabled: do DIDLogic will attempt send DID number as TO when receiving calls to this account ip_restrict: do we need to allowlist IP addresses for this account allowed_ips: IP addresses allowed for this SIP account call_restrict: flag indicates what SIP account should have maximum call time call_limit: maximum call duration in seconds channels_restrict: flag indicates what SIP account should have maximum channels limit max_channels: maximum sip channels cost_limit: flag indicates what SIP account should have maximum call cost max_call_cost: maximum call cost for this SIP account created_at: date of creation this SIP account

Example:

{
    "sipaccount": {
        "id": 61,
        "name": "12345",
        "callerid": "17254999999",
        "label": "TEST DEVICE",
        "host": "dynamic",
        "charge": "0.0",
        "talk_time": 0,
        "rewrite_enabled": false,
        "rewrite_cond": "8",
        "rewrite_prefix": "7",
        "didinfo_enabled": false,
        "ip_restrict": false,
        "call_restrict": true,
        "call_limit": 2800,
        "channels_restrict": false,
        "max_channels": 1,
        "cost_limit": false,
        "max_call_cost": "5.0",
        "created_at": "2024-06-03 06:06:47 UTC",
        "allowed_ips": ["1.2.3.4", "3.4.5.6"]
    }
}

update_sip_account

Creates a SIP account

Args: name: SIP account name password: Password to be used for this SIP account callerid: CallerID associated with this SIP account label: label fot this SIP account rewrite_enabled: do SIP account have calling number rewriting rule rewrite_cond: prefix to be rewrited (ex: 00) rewrite_prefix: prefix to what should be rewritten (ex: 44) didinfo_enabled: do DIDLogic will attempt send DID number as TO when receiving calls to this account ip_restrict: do we need to allowlist IP addresses for this account call_restrict: flag indicates what SIP account should have maximum call time call_limit: maximum call duration in seconds channels_restrict: flag indicates what SIP account should have maximum channels limit max_channels: maximum sip channels cost_limit: flag indicates what SIP account should have maximum call cost max_call_cost: maximum call cost for this SIP account

Returns a JSON object with SIP account details where: id: ID of SIP account name: SIP account name (login) callerid: CallerID associated with this SIP account label: label fot this SIP account charge: charge for calls on this month talk_time: total talk time for this month rewrite_enabled: do SIP account have calling number rewriting rule rewrite_cond: prefix to be rewrited (ex: 00) rewrite_prefix: prefix to what should be rewritten (ex: 44) didinfo_enabled: do DIDLogic will attempt send DID number as TO when receiving calls to this account ip_restrict: do we need to allowlist IP addresses for this account allowed_ips: IP addresses allowed for this SIP account call_restrict: flag indicates what SIP account should have maximum call time call_limit: maximum call duration in seconds channels_restrict: flag indicates what SIP account should have maximum channels limit max_channels: maximum sip channels cost_limit: flag indicates what SIP account should have maximum call cost max_call_cost: maximum call cost for this SIP account created_at: date of creation this SIP account

Example:

{
    "sipaccount": {
        "id": 61,
        "name": "12345",
        "callerid": "17254999999",
        "label": "TEST DEVICE",
        "host": "dynamic",
        "charge": "0.0",
        "talk_time": 0,
        "rewrite_enabled": false,
        "rewrite_cond": "8",
        "rewrite_prefix": "7",
        "didinfo_enabled": false,
        "ip_restrict": false,
        "call_restrict": true,
        "call_limit": 2800,
        "channels_restrict": false,
        "max_channels": 1,
        "cost_limit": false,
        "max_call_cost": "5.0",
        "created_at": "2024-06-03 06:06:47 UTC",
        "allowed_ips": ["1.2.3.4", "3.4.5.6"]
    }
}

delete_sip_account

Delete a SIP account

Args: name: SIP account name

Returns a SIP Account deleted message on success

get_allowed_ips

Get list of whitelisted IPs for a SIP account

Args: sipaccount_name: Name of SIP account

Returns a JSON object with array of whitelisted IP for SIP Account Example output: { "allowed_ips": [ "88.99.12.33" ] }

add_allowed_ip

Whitelist an IP to a SIP account

Args: sipaccount_name: Name of SIP account ip: IP address to allow

Returns a JSON object with all whitelisted IP addresses for account Example output: { "allowed_ips": [ "88.99.12.33", "99.33.55.11" ] }

delete_allowed_ip

Delete an whitelisted IP from a SIP account

Args: sipaccount_name: Name of SIP account ip: IP address to remove from whitelist

Returns "IP removed successfully" when IP removed from whitelisted

list_purchases

List purchased DIDs in DIDLogic

Args: page: page of result starting with 1 per_page: how many results should be on per page

Returns a JSON object with a call history results where: purchases: List of purchased DIDs number: Number of DID channels: How many parallel channels DID have country: Country name area: City name 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 codec: what SIP codec is preferred for this number check_state: DID state

pagination: Pagination details for results
    page: current page of results
    per_page: results per page
    total_pages: total pages results
    total_records: total query records (maximum 5000)

Example response:

{
    "purchases": [
        {
            "number": "441172999999",
            "channels": 2,
            "country": "United Kingdom",
            "area": "Bristol",
            "codec": "G711",
            "activation": 0.0,
            "monthly_fee": 0.99,
            "per_minute": 0.001,
            "check_state": "checked",
            "free_minutes": 0
        }
    ],
    "pagination": {
        "pages": 1,
        "page": 1,
        "per_page": 100,
        "total_records": 50
    }
}

list_destinations

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
        }
    ]
}

add_destination

Add a DID destination.

Args: number: DID number in DIDLogic 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) destination: destination

Returns a JSON object with did destination 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:

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

delete_destination

Remove destination from DID.

Args: number: DID number in DIDLogic id: destination ID to remove

Returns a Destination deleted on success

list_countries

List available countries with DID for purchase on DIDLogic

Args: sms_enabled: search for DID with SMS functionality

Returns a JSON object with available countries for purchase. Returned countries list have following fields: id: ID of country name: Name of country in DIDLogic short_name: ISO code of country has_provinces_or_states: do country have provinces or states which can be queried by list_country_regions tool.

403 error indicates disabled API calls for purchase.

Example:

    {
        "countries": [
            {
                "id": 8669,
                "name": "Argentina",
                "short_name": "AR",
                "has_provinces_or_states": false
            }
        ]
    }

list_country_regions

List country regions with available DIDs for purchase

Args: country_id: ID of country for search sms_enabled: search for DID with SMS functionality

Returns a JSON object with available regions for purchase. Returned countries list have following fields: id: ID of region name: Name of region in DIDLogic short_name: short code for region

403 error indicates disabled API calls for purchase.

Example:

{
    "regions": [
        {
            "id": 1,
            "name": "Alberta",
            "short_name": "AB"
        }
}

list_country_cities

List of Cities with available DID for purchase in a country

Args: country_id: ID of country for search sms_enabled: search for DID with SMS functionality

Returns a JSON object with available cities for purchase DIDs. Returned cities list have following fields: id: ID of city name: Name of city in DIDLogic area_code: Area code within country count: count of available DIDs for purchasing

403 error indicates disabled API calls for purchase.

Example:

{
    "cities": [
        {
            "id": 118557,
            "name": "Ottawa-Hull, ON",
            "area_code": "613800",
            "count": 81
        }
    ]
}

list_country_cities_in_region

List of Cities with available DID in a region of a country

Args: country_id: ID of country for search region_id: ID of region in a country sms_enabled: search for DID with SMS functionality

Returns a JSON object with available cities for purchase DIDs. Returned cities list have following fields: id: ID of city name: Name of city in DIDLogic area_code: Area code within country count: count of available DIDs for purchasing

403 error indicates disabled API calls for purchase.

Example:

{
    "cities": [
        {
            "id": 118557,
            "name": "Ottawa-Hull, ON",
            "area_code": "613800",
            "count": 81
        }
    ]
}

list_dids_in_country_city

List of available DID in a city of a country

Args: country_id: ID of country for search city_id: ID of city in a country sms_enabled: search for DID with SMS functionality page: page of result starting with 1 per_page: how many results should be on per page

Returns a JSON object with available DIDs where: dids: Array of DID available for purchasing where: id: ID of DID country: Country name city: City name sms_enabled: Is number capable of receiving SMS channels: How many parallel channels have DID free_min: How many free minutes per month DID have activation: Activation cost for DID in USD monthly: Monthly fee for DID per_minute: Per minute cost for DID origination_per_min: per minute cost if origin based rate applied required_documents: required documents for activating number, where: 1 = Any form of ID 2 = Proof of address 3 = Proof of local address number: DID Number in E164 format pagination: Pagination details for results page: current page of results total_pages: total pages results total: total query records

403 error indicates disabled API calls for purchase.

Example:

{
    "dids": {
        "pagination": {
            "total": 52,
            "total_pages": 1,
            "current_page": 1
        },
        "dids": [
            {
                "id": 112370,
                "country": "Canada",
                "city": "Edmonton, AB",
                "sms_enabled": false,
                "no_local_cli": false,
                "channels": 4,
                "free_min": 0,
                "cnam": null,
                "activation": 1.0,
                "monthly": 1.0,
                "per_minute": 0.01,
                "origination_per_min": null,
                "required_documents": [],
                "state": "Alberta",
                "country_short_name": "CA",
                "number": "17806999999"
            }
        ]
    }
}

purchase_did

Purchase DID from DIDLogic

Args: number: DID number for purchase in E164 format

Returns a JSON object with purchased DID details where: errors: Errors what happened in purchase process purchases: Array of purchased 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:

{
    "purchase": {
        "errors": {},
        "purchases": [
            {
                "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
            }
        ]
    }
}

remove_purchased_did

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
        }
    ]
}

get_call_history

Query Call history in DIDlogic

Args: call_type: Type of call history items where: sip = outbound sip calls incoming = inbound calls to DID from_date: Date to search from, should be in YYYY-MM-DD format to_date: Date to search to, should be in YYYY-MM-DD format number: Number to search for incoming calls sip_account: SIP account name to search for outbound calls from_search: Number from whom was the call to_search: Number to what was the call page: page of result starting with 1 per_page: how many results should be on per page

Returns a JSON object with a call history results where: calls: array of call history objects where: timestamp: date of the call type: call type where: sip = outbound sip call incoming = inbound call to DID amount: charge for this call in USD duration: duration of call in seconds from: from number for this call to: to number which this call was made destination_name: destination network name for this call sip_account: SIP account name for outbound SIP calls pagination: Pagination details for results page: current page of results per_page: results per page total_pages: total pages results total_records: total query records (maximum 5000)

Example response:

    {
        "calls": [
            {
                "timestamp": "2024-11-20T13:29:19Z",
                "type": "sip",
                "amount": 0.02,
                "duration": 0,
                "from": """ <1212123123>",
                "to": "1555123123",
                "destination_name": "United States - NOT EXISTED",
                "sip_account": "12345"
            }
        ],
        "pagination": {
            "page": 1,
            "per_page": 100,
            "total_pages": 50,
            "total_records": 5000
        }
    }

get_transactions

Load transaction history from DIDLogic

Args: transaction_type: Type of transaction to search where: adjustment = Adjustments made by DIDLogic finances activation = Activation payments for DID month = Monthly payments for DID paypal_in = Paypal TopUps call = Per minute charges for inbound calls call_fix_fee = Per minute charges for PSTN DID destinations sms = SMS charges inbound_sms = Inbound SMS charges cc_in = Credit card TopUps stripe_in = Stripe express payments TopUps porting = Porting Fees start_date: Search start date in format YYYY-MM-DD end_date: Search end date in format YYYY-MM-DD

Returns a CSV table of transactions where: Date: Date of transaction Time: Time of transaction Transaction type: Type of transaction Comment: Comment for transaction Amount: Transaction Amount Balance: Balance after transaction creation Status: Transaction status where: Confirmed = transaction confirmed but not commited yet Committed = transaction settled Rejected = transaction reverted back

Example:

Date,Time,Transaction type,Comment,Amount,Balance,Status
01/05/25,06:00 am,Monthly fees,Monthly fee for 18565999999,$-0.9900,$16.1273,Committed

Prompts

Interactive templates invoked by user choice

check_balance

Check the current account balance

delete_sipaccount

Help user delete sipaccount

list_all_sipaccounts

List all SIP accounts and their details

create_new_sipaccount

Guide the user through creating a new SIP account

enable_ip_restriction_for_sipaccount

Enable IP restriction for selected SIP account

manage_allowed_ips

Manage IP restrictions for a SIP account

update_sipaccount

Updates sipaccount settings

update_sipaccount_security

Update security settings for a SIP account

Resources

Contextual data attached and managed by the client

No resources