Skip to main content
Glama

list_messages

Lists emails from a specified Outlook mail folder by name, alias, or ID; supports unread, flagged, focused, limit, cursor, and offline cache options.

Instructions

List emails in a mail folder (accepts folder ID, display name/prefix, or well-known alias such as 'inbox', 'sent', 'drafts', 'archive', 'trash', 'junk'). Usually 1-2 Graph requests. The first call on a large folder syncs at most 40 pages (sync_complete: false until done); unread/flagged/focused filters scan at most 20 pages. offline: true reads the cache only.

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
limitNo
cursorNoOpaque next_cursor from a previous response
folderNoFolder name, alias, or ID (default 'inbox')
unreadNo
compactNoDefault true. Set false for every cached field (no attachment bytes)
flaggedNo
focusedNo
offlineNoRead the local cache only; no Graph request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/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 expected request cost ('Usually 1-2 Graph requests'), the 40-page cap on first sync with a sync_complete: false signal, a 20-page scan cap for unread/flagged/focused filters, and that offline reads the cache only. Remaining gaps are read-only status (only implied by 'List'), result ordering, and what a partially synced page means for callers, so it falls short of a 5.

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?

Purpose is front-loaded in the first clause, followed by cost, paging limits, and the offline case in ascending order of detail. Every sentence carries information, though the heavy parenthetical in the first sentence makes it slightly dense to parse.

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?

For an 8-parameter list tool with no annotations and no output schema, the description covers the risky parts an agent must know: paging/sync truncation, filter scan caps, cache-only mode, and folder identifier forms. It omits the meaning of limit and how to continue with cursor after a partial sync, which are the notable remaining holes.

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

Parameters4/5

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

Schema coverage is only 50%, and several parameters (unread, flagged, focused, limit) have no schema description at all. The description compensates by naming the alias values accepted for folder and by explaining that the three boolean filters trigger a bounded 20-page scan, which gives those bare booleans real meaning; limit and cursor semantics remain unexplained, so it does not fully close the gap.

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

Purpose5/5

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

States a specific verb and resource ('List emails in a mail folder') and immediately enumerates the accepted folder identifier forms, including well-known aliases. This lets an agent distinguish it from search_mail or get_message without opening the schema, since it is clearly a folder-scoped enumeration rather than a query or single-item fetch.

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 context is implied rather than stated: the description explains what happens on a large folder and that offline: true reads only the cache, which implicitly tells the agent when to prefer cache-only versus live reads. It never explicitly says when to choose this over search_mail or how to handle a folder not covered by the alias list, so there is no real when/when-not routing.

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