Skip to main content
Glama
Michaelzag

Migadu MCP Server

by Michaelzag

get_forwarding

Read-onlyIdempotent

Retrieve details about a specific email forwarding including its confirmation status, expiry date, and active state.

Instructions

Get details for a specific forwarding (confirmation status, expiry, active state).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxYes
addressYes
domainNo

Implementation Reference

  • Executes the HTTP GET to the Migadu API to fetch a specific forwarding by its address (URL-encoded). This is the core service-layer logic invoked by the tool handler.
    async def get_forwarding(
        self, domain: str, mailbox: str, address: str
    ) -> dict[str, Any]:
        return await self.client.get(
            f"/domains/{domain}/mailboxes/{mailbox}/forwardings/{_encode_address(address)}"
        )
  • The MCP tool handler for 'get_forwarding'. Decorated with @migadu_tool(mcp, read_only=True), it resolves the domain, logs the request, and delegates to ForwardingService.get_forwarding.
    @migadu_tool(mcp, read_only=True)
    async def get_forwarding(
        mailbox: str, address: str, ctx: Context, domain: str | None = None
    ) -> dict[str, Any]:
        """Get details for a specific forwarding (confirmation status, expiry, active state)."""
        resolved = resolve_domain(domain)
        await ctx.info(f"📋 Getting forwarding {address} on {mailbox}@{resolved}")
        return (
            await get_service_factory()
            .forwarding_service()
            .get_forwarding(resolved, mailbox, address)
        )
  • The register_forwarding_tools function is called from main.py to register all forwarding tools including get_forwarding on the FastMCP server.
    def register_forwarding_tools(mcp: FastMCP) -> None:
  • initialize_server() calls register_forwarding_tools(mcp), registering the get_forwarding tool on the MCP server.
    def initialize_server() -> None:
        register_domain_tools(mcp)
        register_mailbox_tools(mcp)
        register_identity_tools(mcp)
        register_alias_tools(mcp)
        register_rewrite_tools(mcp)
        register_forwarding_tools(mcp)
  • Helper function that URL-encodes the forwarding address for use in the API path.
    def _encode_address(address: str) -> str:
        return quote(address, safe="")
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds value by specifying the fields returned (confirmation status, expiry, active state), providing behavioral context 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.

Conciseness5/5

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

The description is a single, concise sentence with no wasted words. It front-loads the purpose and immediately adds useful detail, earning its place.

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?

The description lists return fields but omits parameter explanations and output structure. Given no output schema and 3 parameters, it is incomplete for an agent to use independently.

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%, but the description does not explain any parameters (mailbox, address, domain). The purpose is inferable from the tool name, but the description offers no additional meaning, leaving the agent to guess input semantics.

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

Purpose5/5

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

The description clearly states 'Get details for a specific forwarding' with a specific verb and resource, and lists confirmation status, expiry, and active state, differentiating it from siblings like list_forwardings or create_forwarding.

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

Usage Guidelines3/5

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

The description implies use for retrieving a single forwarding's details, but lacks explicit guidance on when to use it versus alternatives like list_forwardings or when not to use it.

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