get_domain
Retrieve complete configuration and status information for a specified domain in your Migadu account.
Instructions
Get full details for a specific domain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- migadu_mcp/tools/domain_tools.py:23-27 (handler)The MCP tool handler function for 'get_domain'. Decorated with @migadu_tool, it accepts a domain name and a Context, logs the action, then delegates to the service layer's get_domain method.
@migadu_tool(mcp, read_only=True) async def get_domain(name: str, ctx: Context) -> dict[str, Any]: """Get full details for a specific domain.""" await ctx.info(f"📋 Getting domain {name}") return await get_service_factory().domain_service().get_domain(name) - The tool has an implicit schema defined by its signature: a required string parameter 'name' and a Context. No separate Pydantic model is used for this read-only tool. The FastMCP framework auto-generates the JSON schema from the type hints.
async def get_domain(name: str, ctx: Context) -> dict[str, Any]: """Get full details for a specific domain.""" await ctx.info(f"📋 Getting domain {name}") return await get_service_factory().domain_service().get_domain(name) - migadu_mcp/main.py:51-52 (registration)The server initialization function calls register_domain_tools(mcp) which registers all domain tools including 'get_domain' on the FastMCP server instance.
def initialize_server() -> None: register_domain_tools(mcp) - migadu_mcp/utils/decorators.py:89-92 (registration)Inside the @migadu_tool decorator, the function wrapper is registered with FastMCP via mcp.tool(annotations=annotations)(wrapper) with readOnlyHint=True.
mcp.tool(annotations=annotations)(wrapper) return wrapper return decorator - The service layer implementation of get_domain. Makes a GET request to the Migadu API endpoint /domains/{name} to retrieve full domain details.
async def get_domain(self, name: str) -> dict[str, Any]: return await self.client.get(f"/domains/{name}")