Skip to main content
Glama
Michaelzag
by Michaelzag

get_mailbox

Retrieve complete mailbox configuration details by providing an email address or local part, returning a JSON object with all relevant settings.

Instructions

Get detailed mailbox information with smart domain resolution.

Args: target: Email address or local part if MIGADU_DOMAIN set

Returns: JSON object with complete mailbox configuration

Input Schema

NameRequiredDescriptionDefault
targetYes

Input Schema (JSON Schema)

{ "properties": { "target": { "title": "Target", "type": "string" } }, "required": [ "target" ], "type": "object" }

Implementation Reference

  • The primary handler function for the 'get_mailbox' MCP tool. It parses the target email, logs the operation, calls the mailbox service to fetch details from the API, and returns the result.
    @mcp.tool( annotations={ "readOnlyHint": True, "idempotentHint": True, "openWorldHint": True, }, ) async def get_mailbox(target: str, ctx: Context) -> Dict[str, Any]: """Get detailed mailbox information with smart domain resolution. Args: target: Email address or local part if MIGADU_DOMAIN set Returns: JSON object with complete mailbox configuration """ try: parsed = parse_email_target(target) domain, local_part = parsed[0] email_address = format_email_address(domain, local_part) await log_operation_start(ctx, "Retrieving mailbox details", email_address) service = get_service_factory().mailbox_service() result = await service.get_mailbox(domain, local_part) await log_operation_success(ctx, "Retrieved mailbox details", email_address) return result except Exception as e: await log_operation_error(ctx, "Get mailbox", str(target), str(e)) raise
  • Helper service method that performs the actual API call to retrieve mailbox details from Migadu.
    async def get_mailbox(self, domain: str, local_part: str) -> Dict[str, Any]: """Retrieve detailed configuration for a specific mailbox including all settings and permissions. Shows complete mailbox state including authentication, protocol access, spam filtering, autoresponder status, and security policies for inspection and troubleshooting. """ return await self.client.request( "GET", f"/domains/{domain}/mailboxes/{local_part}" )
  • The registration call to register_mailbox_tools(mcp), which defines and registers the get_mailbox tool via its @mcp.tool decorator.
    register_mailbox_tools(mcp) register_identity_tools(mcp) register_alias_tools(mcp) register_rewrite_tools(mcp) register_resources(mcp)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Michaelzag/migadu-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server