set_email_flags
Manage IMAP flags on emails by adding or removing \Seen, \Flagged, \Answered, or \Draft for specified email IDs, with per-ID success/failure reporting.
Instructions
Add or remove approved IMAP flags on one or more emails by email_id. Supported flags are \Seen, \Flagged, \Answered, and \Draft; \Deleted and provider-specific keywords are not supported. Use list_emails_metadata first. Partial or ambiguous effects report per-ID succeeded/failed/unknown status and are not retried automatically.
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": {
"account_name": "<account_name>",
"email_ids": "<email_ids>",
"operation": "<operation>",
"flags": "<flags>"
},
"name": "set_email_flags"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | Yes | Unique approved flags to add or remove: \Seen, \Flagged, \Answered, or \Draft. | |
| mailbox | No | The mailbox containing the emails. | INBOX |
| email_ids | Yes | List of email_id values whose flags should be changed. | |
| operation | Yes | Whether to add or remove every supplied flag. | |
| account_name | Yes | The name of the email account. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |