Skip to main content
Glama

List messages in the synced window

list_messages
Read-onlyIdempotent

Lists messages already synced for an inbox (does not hit the provider). Call sync_inbox first if stale. Demo messages carry isDemo:true. Paged: returns at most limit messages (default 50, max 200) starting at offset, plus total/hasMore/nextOffset. An iCloud, IMAP, or Microsoft window can hold ~300 messages, so page with offset (pass nextOffset back in) rather than assuming one call returns everything. Defaults to the Inbox; pass folder to read Sent or Drafts. query and unreadOnly search the Inbox unless folder is set. Narrow with query/unreadOnly/folder first to cut down how many pages you need. Each row has a preview only; call get_message for the full text (works for every provider, including iCloud and IMAP). A row with a junkHint ({ kind, reason }) only looks like junk or a scam; nothing was moved, so decide with the person.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inboxId": "<inboxId>"
    },
    "name": "list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax messages to return, clamped 1..200. Default 50.
queryNoSimple substring filter over subject/from/snippet, within the synced window only.
folderNoRestrict to one canonical folder id/name (see list_folders / message.folder).
offsetNoNumber of matching messages to skip, for paging. Default 0. Use the previous response's nextOffset.
inboxIdYes
unreadOnlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the read-only/idempotent/local safety profile, yet the description adds real context beyond them: paging limits (default 50, max 200), the ~300-message window per provider, isDemo:true on demo rows, and the crucial junkHint meaning ('only looks like junk... nothing was moved, so decide with the person'). The one gap is that the actual response envelope (total/hasMore/nextOffset) is described informally rather than with an output schema.

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 core purpose, then paging, folder defaults, filtering strategy, and the junkHint caveat — all in serviceable order. It is dense and a bit long, but nearly every sentence supplies an actionable constraint rather than filler.

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

Completeness5/5

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

With no output schema, the description compensates by sketching the return shape (rows with preview only, total/hasMore/nextOffset, isDemo, junkHint) and by warning about the paged-window assumption. An agent can page correctly and route to get_message without guessing.

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 67%, so the schema carries much of the load, but the description adds semantics the schema does not: query/unreadOnly scope to the Inbox unless folder is set, and offset should be fed the previous response's nextOffset. The remaining parameter (inboxId) is required and self-evident.

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?

Specific verb plus resource plus scope: 'Lists messages already synced for an inbox (does not hit the provider).' This cleanly separates it from sync_inbox (provider fetch), get_message (full text), and search_mailbox (a different sibling), so an agent can pick it without opening a schema.

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

Usage Guidelines5/5

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

Explicit when-to-use and what-else: call sync_inbox first if stale, page with offset/nextOffset, pass folder to read Sent or Drafts, and call get_message for full text. It even gives an optimization path — narrow with query/unreadOnly/folder first to reduce pages.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources