search_messages
Search Outlook mail across folders by query, sender, recipient, date, attachments, flags, or category, with optional body search and paging.
Instructions
Search mail, newest first. query matches subject, sender name or sender address (case-insensitive); the filters narrow further. Searches every non-empty folder of the accounts unless folder_id is given; last 90 days by default.
Args:
query: Text to look for; may be empty when a filter is given.
folder_id: Only this folder.
account: Only this account's folders.
since_days: Last N days (default 90; null searches everything, slow on big mailboxes).
include_body: Also search body text (slower).
limit: Maximum messages (1-200, default 50).
from_address: Sender address contains this text.
to_address: A To or Cc address contains this text.
has_attachments: true / false to filter; omit for either.
flagged: true / false to filter; omit for either.
category: Only messages with this category.
after, before: Received after / before these ISO dates (after replaces since_days).
offset: Skip this many results first (paging).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ||
| limit | No | ||
| query | No | ||
| before | No | ||
| offset | No | ||
| account | No | ||
| flagged | No | ||
| category | No | ||
| folder_id | No | ||
| since_days | No | ||
| to_address | No | ||
| from_address | No | ||
| include_body | No | ||
| has_attachments | No |