Skip to main content
Glama
Michaelzag
by Michaelzag

get_mailbox

Retrieve detailed mailbox configuration information from Migadu email hosting services using email addresses or local parts with smart domain resolution.

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

TableJSON Schema
NameRequiredDescriptionDefault
targetYes

Implementation Reference

  • The primary handler for the 'get_mailbox' tool. Decorated with @mcp.tool() and implements the core logic: parses the target email address, calls the mailbox service to fetch details, handles logging and errors.
    @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
  • Service layer helper method that performs the actual API call to retrieve mailbox information 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}" )
  • Top-level registration where register_mailbox_tools(mcp) is called, which in turn registers the get_mailbox tool via its @mcp.tool decorator.
    def initialize_server(): """Initialize the MCP server with all tools and resources""" # Register all tools 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