create_email_address
Provision an email address to receive verification codes and emails from online services. Optionally set a custom local part; leaves auto-generated if omitted. Returns full address and status.
Instructions
Provision a new email address for sending and receiving mail. Use this when signing up for services that require email verification — the agent gets a real inbox.
local_part is the part before the @ (e.g. "my-agent"); leave null to
auto-generate. Returns id, email_address (full address to paste into
forms), provider, status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| local_part | No |
Implementation Reference
- agentline_mcp/server.py:264-278 (handler)The MCP tool handler for create_email_address — decorates with @mcp.tool(), accepts optional local_part, delegates to the Agentline SDK client, and returns the result as a dict.
@mcp.tool() def create_email_address(local_part: str | None = None) -> dict: """Provision a new email address for sending and receiving mail. Use this when signing up for services that require email verification — the agent gets a real inbox. `local_part` is the part before the @ (e.g. "my-agent"); leave null to auto-generate. Returns `id`, `email_address` (full address to paste into forms), `provider`, `status`. """ try: result = _client_or_init().create_email_address(local_part=local_part) return asdict(result) except AgentlineError as e: return {"error": str(e), "status_code": e.status_code} - agentline_mcp/server.py:264-265 (registration)Tool registration via FastMCP @mcp.tool() decorator on line 264, which registers the function as an MCP tool named 'create_email_address'.
@mcp.tool() def create_email_address(local_part: str | None = None) -> dict: - agentline_mcp/server.py:270-272 (schema)Docstring describing the input schema (optional local_part) and output shape (id, email_address, provider, status).
`local_part` is the part before the @ (e.g. "my-agent"); leave null to auto-generate. Returns `id`, `email_address` (full address to paste into forms), `provider`, `status`. - agentline_mcp/server.py:51-55 (helper)Helper function that lazily initializes and caches the Agentline SDK client used by the handler.
def _client_or_init() -> Agentline: global _client if _client is None: _client = _build_client() return _client