reset_mailbox_password
Reset password for one or more mailboxes by providing the target identifier and new password.
Instructions
Reset mailbox password(s). List of dicts with: target, new_password.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes |
Implementation Reference
- The actual implementation of reset_mailbox_password in the service layer. It calls the Migadu API PUT endpoint for the mailbox with the new password in the JSON body.
async def reset_mailbox_password( self, domain: str, local_part: str, new_password: str ) -> dict[str, Any]: return await self.client.put( f"/domains/{domain}/mailboxes/{local_part}", json={"password": new_password}, ) - The MCP tool handler for reset_mailbox_password. It parses the target email, delegates to the mailbox service, and returns a success response.
@migadu_bulk_tool(mcp, MailboxPasswordResetRequest, entity="password reset") async def reset_mailbox_password( item: MailboxPasswordResetRequest, ctx: Context ) -> dict[str, Any]: """Reset mailbox password(s). List of dicts with: target, new_password.""" domain, local_part = parse_email_target(item.target)[0] email = format_email_address(domain, local_part) await ctx.info(f"📋 Resetting password for {email}") await ( get_service_factory() .mailbox_service() .reset_mailbox_password(domain, local_part, item.new_password) ) return {"reset": email, "success": True} - migadu_mcp/utils/schemas.py:93-95 (schema)Pydantic schema for MailboxPasswordResetRequest defining the target email and new_password fields.
class MailboxPasswordResetRequest(BaseModel): target: str = Field(..., description="Email address or local part") new_password: str = Field(..., description="New password for authentication") - migadu_mcp/tools/mailbox_tools.py:146-148 (registration)The function reference used to keep the tool registered in the FastMCP instance (within the register_mailbox_tools function).
reset_mailbox_password, set_autoresponder, )