delete_email
Remove unwanted emails from Outlook using the specified email and account IDs. Simplifies email management by enabling direct deletion through integrated Microsoft Graph API commands.
Instructions
Delete an email
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | ||
| email_id | Yes |
Implementation Reference
- src/microsoft_mcp/tools.py:415-419 (handler)The 'delete_email' tool handler. Deletes the email by sending a DELETE request to Microsoft Graph API endpoint /me/messages/{email_id}. The @mcp.tool decorator handles registration and schema inference from type annotations.@mcp.tool def delete_email(email_id: str, account_id: str) -> dict[str, str]: """Delete an email""" graph.request("DELETE", f"/me/messages/{email_id}", account_id) return {"status": "deleted"}