Skip to main content
Glama
Michaelzag

Migadu MCP Server

by Michaelzag

list_mailboxes

Read-onlyIdempotent

Retrieve all email mailboxes for a domain to review or manage user accounts.

Instructions

List email mailboxes for a domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNo

Implementation Reference

  • MCP tool handler that resolves the domain and delegates to MailboxService.list_mailboxes(). Decorated with @migadu_tool (read_only=True, summarize_response=True).
    async def list_mailboxes(ctx: Context, domain: str | None = None) -> dict[str, Any]:
        """List email mailboxes for a domain."""
        resolved = resolve_domain(domain)
        await ctx.info(f"📋 Listing mailboxes for {resolved}")
        return await get_service_factory().mailbox_service().list_mailboxes(resolved)
  • Service layer that sends GET /domains/{domain}/mailboxes via MigaduClient.
    async def list_mailboxes(self, domain: str) -> dict[str, Any]:
        return await self.client.get(f"/domains/{domain}/mailboxes")
  • Tool registered inside register_mailbox_tools() via the @migadu_tool decorator, which calls mcp.tool() as a side effect (decorators.py line 89).
    def register_mailbox_tools(mcp: FastMCP) -> None:
        @migadu_tool(mcp, read_only=True, summarize_response=True)
        async def list_mailboxes(ctx: Context, domain: str | None = None) -> dict[str, Any]:
            """List email mailboxes for a domain."""
            resolved = resolve_domain(domain)
            await ctx.info(f"📋 Listing mailboxes for {resolved}")
            return await get_service_factory().mailbox_service().list_mailboxes(resolved)
  • Top-level registration call in initialize_server() that triggers the @migadu_tool decorator and thus mcp.tool() registration.
    register_mailbox_tools(mcp)
  • Helper that falls back to the MIGADU_DOMAIN env var when the domain parameter is None.
    def resolve_domain(domain: Optional[str]) -> str:
        """Resolve an optional domain arg against `MIGADU_DOMAIN` env var."""
        if domain:
            return domain
        from migadu_mcp.config import get_config
    
        default = get_config().default_domain
        if not default:
            raise ValueError("No domain provided and MIGADU_DOMAIN is not set")
        return default
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, covering safety and idempotency. The description adds the domain scoping constraint but does not disclose additional behavioral traits beyond what annotations provide. With annotations present, a score of 3 is appropriate.

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 a single, clear sentence with no redundancy. It is appropriately brief for a simple tool, but could be slightly more informative without becoming verbose.

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

Completeness2/5

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

Given the tool's simplicity and the presence of good annotations, the description still lacks key context such as the return value format, authentication requirements, or behavior when domain is omitted. Without an output schema, agents need more information to use the tool correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'for a domain', which implies the domain parameter filters results, but does not explain the default behavior (null meaning all domains?) or add semantic value beyond the parameter name. This is insufficient for the lack of schema descriptions.

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 verb (list) and resource (email mailboxes) and scope (for a domain). It is unambiguous and distinguishes itself from sibling list tools by resource type, though it does not explicitly contrast with siblings.

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?

No guidance is provided on when to use this tool versus alternatives like list_aliases, list_forwardings, etc. The description simply states what it does without context or when-not-to-use hints.

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