imap_search_and_move
Search IMAP messages by sender, subject, date, or query and move matches to a destination mailbox in one call, up to 500 emails.
Instructions
Search messages and move matches to a mailbox in one operation (up to 500)
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": {
"mailbox": "<mailbox>",
"destination_mailbox": "<destination_mailbox>"
},
"name": "imap_search_and_move"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Filter by To header | |
| from | No | Filter by From header | |
| limit | No | Maximum messages to move (1..500, default 500) | |
| query | No | Full-text search query | |
| mailbox | Yes | Source mailbox to search (e.g., `INBOX`) | |
| subject | No | Filter by Subject header | |
| end_date | No | Filter to messages before this date (YYYY-MM-DD) | |
| last_days | No | Filter to messages from last N days | |
| account_id | No | Account identifier (defaults to `"default"`) | default |
| start_date | No | Filter to messages on or after this date (YYYY-MM-DD) | |
| unread_only | No | Filter to unread messages only | |
| destination_mailbox | Yes | Destination mailbox name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Tool-specific data payload | |
| meta | Yes | Execution metadata (timestamp, duration) | |
| summary | Yes | Human-readable summary of the operation outcome |