Skip to main content
Glama

List Email Messages

list_messages
Read-only

Retrieve 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

NameRequiredDescriptionDefault
topNoNumber of messages to return (default: 25)
filterNoOData 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.
folderNoOnly 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.
mailboxNoEmail 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_pagesNoFetch all pages of results (max 50 pages)
include_previewNoAdd each message's body preview (Graph's bodyPreview, up to 255 characters) on an indented line

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

readOnlyHint=true already establishes the read-only safety profile, so the bar is lower. The description still adds value by disclosing sort order and the exact per-line output composition (sender name/address, received time, Graph message ID, internetMessageId). It does not mention pagination limits or that include_preview adds an extra indented line, both behavioral facts an agent would benefit from.

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

Conciseness5/5

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

Three short sentences, front-loaded with the action and ordering, then scope, then output shape. Every clause carries information and nothing is padding.

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?

With six optional parameters, no required inputs and no output schema, the description does the important extra work of describing the returned line format and default folder span. Gaps remain around pagination and the preview line, but the core call is fully understandable from the definition.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter is already documented, making 3 the baseline. The description adds only marginal meaning: it restates the all-folders default for folder and enumerates the default output line, but says nothing about top, filter, mailbox, fetch_all_pages, or how include_preview changes the output.

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?

The description gives a specific verb and resource ("List email messages") plus ordering ("newest first") and default scope ("Covers every folder... unless folder is set"). It is clearly a listing operation, distinguishable in spirit from search_messages or list_attachments, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the folder default tells the agent the tool spans all folders unless narrowed. There is no explicit when-to-use vs. search_messages, and the useful "use folder instead of filtering on parentFolderId" guidance lives only in the input schema, not the description.

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