reset_mailbox_password
Reset passwords for Migadu email mailboxes. Provide email addresses and new passwords to update access credentials securely.
Instructions
Reset mailbox passwords. List of dicts with: target (email/local), new_password (required).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resets | Yes |
Implementation Reference
- The MCP tool handler for reset_mailbox_password. Processes bulk password reset requests using the bulk_processor pattern and delegates to the service layer.@mcp.tool( annotations={ "readOnlyHint": False, "destructiveHint": False, "idempotentHint": True, "openWorldHint": True, }, ) async def reset_mailbox_password( resets: List[Dict[str, Any]], ctx: Context ) -> Dict[str, Any]: """Reset mailbox passwords. List of dicts with: target (email/local), new_password (required).""" count = len(list(ensure_iterable(resets))) await log_bulk_operation_start(ctx, "Resetting passwords for", count, "mailbox") result = await process_reset_password(resets, ctx) await log_bulk_operation_result(ctx, "Password reset", result, "mailbox") return result
- migadu_mcp/utils/schemas.py:125-130 (schema)Pydantic schema used for input validation of reset_mailbox_password tool requests.class MailboxPasswordResetRequest(BaseModel): """Request schema for resetting mailbox password""" target: str = Field(..., description="Email address or local part") new_password: str = Field(..., description="New password for authentication")
- migadu_mcp/main.py:17-24 (registration)Registration of mailbox tools (including reset_mailbox_password) by calling register_mailbox_tools(mcp).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)
- Service layer method that performs the actual API call to reset the mailbox password via Migadu API.async def reset_mailbox_password( self, domain: str, local_part: str, new_password: str ) -> Dict[str, Any]: """Reset mailbox password""" data = {"password": new_password} return await self.client.request( "PUT", f"/domains/{domain}/mailboxes/{local_part}", json=data )