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.)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"email_id": "<email_id>",
"updates": "<updates>",
"account_id": "<account_id>"
},
"name": "update_email"
}
}Input 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