message-search
Search Outlook emails by sender, recipient, subject, body, date, read status, attachments, or category using structured queries, and return selected fields with paging.
Instructions
Search Outlook messages using structured query objects with flexible field selection. A pageSize or fields changed alongside a pageToken has no effect, because the token carries the next-page link that governs the page.
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": "message-search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Structured query object or JSON string for filtering messages. Use query-syntax prompt for reference and kqlQuery for KQL syntax. | |
| shape | No | Response shape: objects (keyed) or arrays (columnar, matching fields order) | objects |
| fields | No | Comma-separated fields to return. Omit for all fields. Available: id, threadId, subject, from, fromName, to, cc, bcc, date, snippet, body, isRead, isImportant, hasAttachments, attachmentCount, labelIds, folderName | |
| pageSize | No | Number of items per page (default: 50, max: 500). Accepts numbers or numeric strings. | |
| pageToken | No | Token for retrieving the next page of results (outlook format). Omit for first page. | |
| contentType | No | Format for body content: text extracts plain text, html preserves HTML structure | text |
| excludeThreadHistory | No | When true, removes quoted thread history from body content |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |