Skip to main content
Glama
Michaelzag

Migadu MCP Server

by Michaelzag

get_mailbox

Read-onlyIdempotent

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)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, open-world, and idempotent behavior, so the description adds value by mentioning 'smart domain resolution' (which clarifies how the 'target' parameter is interpreted) and specifying the return format as a 'JSON object with complete mailbox configuration.' However, it lacks details on error handling, rate limits, or authentication needs beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by structured 'Args' and 'Returns' sections. It is concise with no wasted sentences, though the 'smart domain resolution' phrase could be slightly more explicit for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 1 parameter with no output schema and rich annotations, the description covers the basic purpose and parameter semantics adequately. However, it lacks details on error cases, response structure beyond 'JSON object,' or when to use versus siblings, making it minimally viable but with gaps for a read operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 1 parameter, the description compensates by explaining the 'target' parameter as 'Email address or local part if MIGADU_DOMAIN set,' adding crucial semantic context not in the schema. This clarifies how the input is processed, though it could detail format or constraints more.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Get detailed mailbox information with smart domain resolution,' specifying the verb 'get' and resource 'mailbox information.' It distinguishes from siblings like 'list_mailboxes' (which likely lists multiple) and 'update_mailbox' (which modifies), but does not explicitly contrast them in the description text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'smart domain resolution' but does not explain when this is beneficial or when to choose 'get_mailbox' over 'list_mailboxes' or other sibling tools, leaving usage context implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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