update_email
Modify email properties such as read status, categories, and flags using specific email and account IDs. Integrates with Microsoft MCP server to streamline email management tasks.
Instructions
Update email properties (isRead, categories, flag, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | ||
| email_id | Yes | ||
| updates | Yes |
Implementation Reference
- src/microsoft_mcp/tools.py:402-412 (handler)The main handler function for the 'update_email' tool. It uses the Microsoft Graph API to PATCH the specified email with the provided updates dictionary. Includes error handling if the request fails.@mcp.tool def update_email( email_id: str, updates: dict[str, Any], account_id: str ) -> dict[str, Any]: """Update email properties (isRead, categories, flag, etc.)""" result = graph.request( "PATCH", f"/me/messages/{email_id}", account_id, json=updates ) if not result: raise ValueError(f"Failed to update email {email_id} - no response") return result