delete_allowed_ip
Remove a whitelisted IP address from a specified SIP account to manage access and security. Input the SIP account name and IP address to execute the removal.
Instructions
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
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | IP address to remove from whitelist | |
| sipaccount_name | Yes | Name of sip account |
Implementation Reference
- The core handler function for the 'delete_allowed_ip' tool. It uses Pydantic Field for input schema validation and makes a DELETE API call via base.call_didlogic_api to remove the IP from the SIP account's allowed IPs.@mcp.tool() async def delete_allowed_ip( ctx: Context, sipaccount_name: str | int = Field( description="Name of sip account" ), ip: str = Field(description="IP address to remove from whitelist") ) -> str: """ 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 """ params = {"ip": ip} await base.call_didlogic_api( ctx, "DELETE", f"/v1/sipaccounts/{sipaccount_name}/allowed_ips", params=params ) return "IP removed successfully"
- src/didlogic_mcp/server.py:101-101 (registration)The registration point where the allowed_ips module (containing delete_allowed_ip handler) is registered to the FastMCP server instance.tools.allowed_ips.register_tools(mcp)