Manage Microsoft 365 email: list, read, search, send, reply, draft, move messages, and organize folders, categories, attachments, and rules.
Instructions
Unified email management. draft_reply_all creates a threaded reply-all draft and never sends it (it takes emailId, body, mailbox, attachments, cc and bcc, ADDS cc/bcc to the reply-all recipients, and refuses any other parameter by name); reply/send/send_draft are transmission operations.
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": {
"operation": "<operation>"
},
"name": "mail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC recipients | |
| to | No | Recipient email addresses (for send/draft/reply) | |
| bcc | No | BCC recipients | |
| body | No | Email body in HTML format (for send/draft/reply/draft_reply_all) | |
| from | No | Filter by sender email (for search) | |
| path | No | Local file path (for cleanup_attachment) | |
| batch | No | Use batch processing (for move) | |
| color | No | Category color preset0-preset24 (for create_category) | |
| query | No | Search text or KQL syntax (for search) | |
| isRead | No | Filter by read/unread (for search) | |
| draftId | No | Draft ID (for update_draft, send_draft) | |
| emailId | No | Email ID (for read, get_attachment, reply, draft_reply_all, move, apply_category) | |
| endDate | No | End date - ISO or relative (for search) | |
| mailbox | No | Mailbox to access (default: authenticated user). Use for shared mailboxes. | |
| subject | No | Email subject (for send/draft) | |
| emailIds | No | Email IDs to move (for move) | |
| enhanced | No | Enhanced mode for rules | |
| folderId | No | Folder ID (for list, search) | |
| replyAll | No | Reply to all recipients (for reply). draft_reply_all is always reply-all and draft-only. | |
| forwardTo | No | Forward-to emails (for create_rule) | |
| operation | Yes | The operation to perform | |
| startDate | No | Start date - ISO or relative 7d/1w/1m/1y (for search) | |
| categories | No | Categories (for apply/remove) | |
| categoryId | No | Category ID (for update/delete) | |
| folderName | No | Folder name: inbox/sent/drafts/deleted/junk/archive (for search) | |
| importance | No | Filter by importance | |
| maxResults | No | Maximum number of results | |
| attachments | No | Local file paths to attach (for send/reply/draft/update_draft). Files must be < 3 MB each. On update_draft these are added to the existing draft, not replaced. | |
| displayName | No | Name (for create_folder, create_rule, create_category) | |
| attachmentId | No | Attachment ID (for get_attachment — get IDs from read) | |
| moveToFolder | No | Move-to folder ID (for create_rule) | |
| useRelevance | No | Sort by relevance (for search) | |
| fromAddresses | No | From filter (for create_rule) | |
| hasAttachments | No | Filter by attachments (for search) | |
| includeDeleted | No | Include deleted items (for search) | |
| parentFolderId | No | Parent folder ID (for create_folder) | |
| subjectContains | No | Subject keywords (for create_rule) | |
| destinationFolderId | No | Destination folder ID (for move) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| text | Yes | Complete readable result, including IDs and coverage notes | |
| emails | No | ||
| method | No | ||
| hasMore | No | ||
| limited | No | ||
| returned | No | ||
| pageLimit | No | ||
| serviceLimit | No |