release_number
Release a provisioned phone number to avoid ongoing Telnyx monthly charges. Use after finishing with the number to stop recurring fees.
Instructions
Release a previously provisioned phone number. Call this when done to
avoid ongoing Telnyx monthly charges. Pass the E.164 phone_number returned
by provision_number.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone_number | Yes |
Implementation Reference
- agentline_mcp/server.py:92-102 (handler)The `release_number` MCP tool handler. Decorated with @mcp.tool(), it takes a phone_number string, calls the Agentline SDK's release_number method, and returns a dict with phone_number and released status. Handles AgentlineError exceptions.
@mcp.tool() def release_number(phone_number: str) -> dict: """Release a previously provisioned phone number. Call this when done to avoid ongoing Telnyx monthly charges. Pass the E.164 `phone_number` returned by `provision_number`. """ try: released = _client_or_init().release_number(phone_number) return {"phone_number": phone_number, "released": released} except AgentlineError as e: return {"error": str(e), "status_code": e.status_code} - agentline_mcp/server.py:92-92 (registration)Registration via @mcp.tool() decorator on line 92, which registers `release_number` as an MCP tool with the FastMCP server instance.
@mcp.tool() - agentline_mcp/server.py:93-93 (schema)Input schema: takes a single required string parameter `phone_number`. No type annotations beyond str. The return type is dict (untyped, dynamic).
def release_number(phone_number: str) -> dict: - agentline_mcp/server.py:194-194 (helper)Helper usage inside `capture_code` (line 194): calls `client.release_number(number.phone_number)` to release a number after 2FA code capture.
client.release_number(number.phone_number)