Search
m365_searchSearch emails, events, contacts, and OneDrive files by free text across Microsoft 365 when you don't know where items are. Query one or several resource types at once and page results newest first.
Instructions
Find emails, events, contacts or OneDrive files by free text when you do not know where they are. Search one type or several at once. Do not use it to browse a folder (m365_list) or open a known ID (m365_get). Returns matching items labelled by resource, newest first, plus next_cursor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of items to return. | |
| query | Yes | Words to search for. Plain text; the server handles quoting. | |
| cursor | No | next_cursor from the previous page; keep all other arguments the same. | |
| event_end | No | Event search window end (default: 365 days ahead). | |
| resources | No | Which item types to search. Default: all four. | |
| account_id | No | Account ID or email address. Omit when only one account is signed in. | |
| event_start | No | Event search window start (default: 90 days ago). | |
| email_folder_id | No | Mail folder ID, or one of the aliases inbox, sent, drafts, deleted, junk, archive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| query | Yes | ||
| summary | Yes | One-line human summary. The tool's text content is this result serialized as JSON (summary included), so a client that ignores structuredContent still sees every field. | |
| has_more | Yes | ||
| next_cursor | Yes |