Skip to main content
Glama
Michaelzag
by Michaelzag

list_identities

Retrieve a detailed list of email identities linked to a specific mailbox, including statistical summaries and sample data, to manage and monitor email configurations effectively.

Instructions

List email identities for mailbox. Returns summary with statistics and samples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNo
mailboxYes

Implementation Reference

  • The main handler function for the 'list_identities' MCP tool. It handles parameters, determines domain if not provided, calls the identity service, logs the operation, and returns the result.
    @mcp.tool( annotations={ "readOnlyHint": True, "idempotentHint": True, "openWorldHint": True, }, ) @with_context_protection(max_tokens=2000) async def list_identities( mailbox: str, ctx: Context, domain: str | None = None ) -> Dict[str, Any]: """List email identities for mailbox. Returns summary with statistics and samples.""" if domain is None: from migadu_mcp.config import get_config config = get_config() domain = config.get_default_domain() if not domain: raise ValueError("No domain provided and MIGADU_DOMAIN not configured") await log_operation_start(ctx, "Listing identities", f"{mailbox}@{domain}") try: service = get_service_factory().identity_service() result = await service.list_identities(domain, mailbox) count = len(result.get("identities", [])) await log_operation_success( ctx, "Listed identities", f"{mailbox}@{domain}", count ) return result except Exception as e: await log_operation_error( ctx, "List identities", f"{mailbox}@{domain}", str(e) ) raise
  • Call to register_identity_tools which defines and registers the list_identities tool among others.
    register_identity_tools(mcp)
  • Helper service method that performs the actual API request to list identities for a given domain and mailbox.
    async def list_identities(self, domain: str, mailbox: str) -> Dict[str, Any]: """List all identities for a mailbox""" return await self.client.request( "GET", f"/domains/{domain}/mailboxes/{mailbox}/identities" )

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