graph_list_mail
Lists emails from a mail folder, newest first, with paging, filters, compact results, and shared mailbox support.
Instructions
List emails from a mail folder.
Results are sorted newest first, except that the sort is dropped automatically when filter_query targets from/, sender/, toRecipients/ or ccRecipients/, because Graph cannot combine a sort with a filter on those properties.
Args: folder: Mail folder name or ID (default "inbox"). Common: inbox, sentitems, drafts, deleteditems, archive. top: Maximum number of emails to return per call (default 25, maximum 50). skip: Number of items to skip before returning results (default 0). Graph returns at most 50 per call, so page by raising skip in steps of top. filter_query: Optional OData filter (e.g. "isRead eq false"). Filtering on a sender or recipient drops the sort order, as described above. compact: Whether to return only the identifying fields instead of the full record (default false). Use it to page through large collections cheaply. next_link: Opaque nextLink URL from a previous call, used to fetch the next page. Overrides the other paging arguments when supplied. include_next_link: Whether to wrap the result as {items, next_link} so paging can continue (default false, which returns a bare list). immutable_ids: Whether to ask Graph for immutable message IDs (default false). A message ID changes when the message is moved, so a stored ID stops working; an immutable ID survives the move. mailbox: Shared mailbox address or user ID to act on. Empty targets your own mailbox. Requires the delegated Mail.*.Shared permissions.
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": "graph_list_mail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| skip | No | ||
| folder | No | inbox | |
| compact | No | ||
| mailbox | No | ||
| next_link | No | ||
| filter_query | No | ||
| immutable_ids | No | ||
| include_next_link | No |