get_allowed_ips
Retrieve a list of whitelisted IPs associated with a specific SIP account using JSON output. Use this tool to access and manage authorized IP configurations for secure communications.
Instructions
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" ] }
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sipaccount_name | Yes |
Implementation Reference
- The handler function for the 'get_allowed_ips' MCP tool. It is decorated with @mcp.tool() for automatic registration and schema inference. Calls the Didlogic API to retrieve whitelisted IPs for the specified SIP account.@mcp.tool() async def get_allowed_ips( ctx: Context, sipaccount_name: str | int = Field() ) -> str: """ 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" ] } """ response = await base.call_didlogic_api( ctx, "GET", f"/v1/sipaccounts/{sipaccount_name}/allowed_ips" ) return response.text
- src/didlogic_mcp/server.py:101-101 (registration)Registers all tools from the allowed_ips module (including get_allowed_ips) with the FastMCP server instance.tools.allowed_ips.register_tools(mcp)