set_flags
Manage IMAP flags on emails: mark as read, flagged, answered, draft, deleted, or add custom keywords by specifying flags to add or remove.
Instructions
Set or clear IMAP flags on a message.
Common IMAP system flags (backslash-prefixed): \Seen, \Flagged, \Answered, \Draft, \Deleted. Custom user keywords have no backslash.
Args: folder: Folder containing the email email_id: UID of the email (from search_emails result) add: Flags to add (e.g. ["\Seen", "\Flagged"]) remove: Flags to remove
Returns confirmation with the flags added/removed.
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": {
"folder": "<folder>",
"email_id": "<email_id>"
},
"name": "set_flags"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | ||
| email_id | Yes | ||
| add | No | ||
| remove | No |