Skip to main content
Glama

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

NameRequiredDescriptionDefault
topNo
skipNo
folderNoinbox
compactNo
mailboxNo
next_linkNo
filter_queryNo
immutable_idsNo
include_next_linkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it discloses that sorting is silently dropped for from/sender/toRecipients/ccRecipients filters, that Graph returns at most 50 per call, that next_link overrides paging arguments, and that ordinary message IDs break when a message is moved while immutable_ids survive. It also states the auth prerequisite for mailbox and the two possible return shapes, which are exactly the traits an agent needs before invoking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the surprising sort behavior, then a structured Args block that is easy to scan. It repeats the sort-drop caveat in both the preamble and filter_query, which is mild redundancy, though the repetition is defensible for the parameter most likely to be misused.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers paging mechanics, filtering caveats, permission requirements, and return shape for a 9-parameter list tool with no output schema or annotations. What is missing is smaller: no guidance on total result counts or what item fields compact retains, but an agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 9 parameters, so the description must compensate and it does: every parameter gets meaning, default, and operational implication (top capped at 50 in practice, skip stepping, folder examples like sentitems/deleteditems, next_link overriding other paging args, mailbox targeting rules). The documented 50-item cap adds a real constraint the schema does not express.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

'List emails from a mail folder' is a specific verb plus resource, and the sort/filter caveat front-loads the tool's distinctive behavior. It stops short of naming siblings such as graph_search_mail to explain which one to pick, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete usage contexts for individual options: use compact to page cheaply, page by raising skip in steps of top, next_link overrides other paging args, and mailbox requires delegated Mail.*.Shared permissions. There is no explicit when-not or comparison to a search/read sibling, which keeps it below 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools