List Email Messages
list_messagesRetrieve email messages newest first across all mail folders or a specific one, with OData filters, shared mailbox support, and optional body previews.
Instructions
List email messages, newest first. Covers every folder (Inbox, Sent Items, Archive, ...) unless folder is set. Each line shows the sender's name and address, the received time, the Graph message ID and the internetMessageId.
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": "list_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Number of messages to return (default: 25) | |
| filter | No | OData filter expression, e.g. "importance eq 'high'" or "isRead eq false". Results are sorted newest first, and Graph rejects a filter that does not lead with receivedDateTime, so the tool puts an always-true receivedDateTime condition first when yours does not start with one. To restrict to one folder, use folder instead of filtering on parentFolderId. | |
| folder | No | Only this folder: a well-known name (inbox, sentitems, drafts, deleteditems, archive, junkemail), a top-level folder's display name, or a folder ID from list_mail_folders (needed for a subfolder). Default: every folder. | |
| mailbox | No | Email address of another mailbox to act on (delegated or shared), e.g. 'someone@example.com'. Omit for your own mailbox; required when this server signs in as an application. Only addresses this server is configured to allow will be accepted. | |
| fetch_all_pages | No | Fetch all pages of results (max 50 pages) | |
| include_preview | No | Add each message's body preview (Graph's bodyPreview, up to 255 characters) on an indented line |