list_messages
Lists Outlook folder messages newest first with compact ref handles for follow-up reads, moves, deletes, or bulk actions, and supports search, filters, paging, and fetch-all triage.
Instructions
List messages in a folder, newest first (unless searching).
Returns compact rows keyed by a short ref handle (not the raw Graph id) —
pass that ref to get_message / move / delete / the bulk_* tools.
Args:
folder: folder id or well-known name (inbox, archive, deleteditems, sentitems, drafts, junkemail).
top: max number of messages to return per page (ignored if fetch_all is True).
skip: number of messages to skip, for manual paging (ignored if fetch_all is True).
filter_query: raw OData $filter, e.g. "receivedDateTime le 2026-01-01T00:00:00Z" or "isRead eq false".
search: free-text search (Graph $search); when set, filter_query/order are ignored.
fetch_all: if True, follow pagination automatically and return up to max_results messages
instead of a single page of top. Use this for bulk operations over a whole folder.
max_results: cap on messages returned when fetch_all is True (safety limit, default 500).
include_keywords: attach a short salient-keyword list per message (subject+preview) for triage.
include_preview: attach the full plaintext preview per message. Prefer include_keywords for triage
and get_message for a full read — a preview per message across a big folder is costly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| skip | No | ||
| folder | No | inbox | |
| search | No | ||
| fetch_all | No | ||
| max_results | No | ||
| filter_query | No | ||
| include_preview | No | ||
| include_keywords | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |