Skip to main content
Glama

Load older messages for one folder (extends only that folder's window)

load_older_messages

Fetches messages older than the current synced window for exactly one folder of one inbox. Extends only that folder's window for this inbox, never the default sync window (~300 iCloud/IMAP/Microsoft; Gmail's stored window grows to 300 over its first syncs, 40 newest per sync) that other folders and inboxes still use, and never past the hard per-folder cap of 1000 messages (refuses once reached). Gmail stays metadata-first, exactly like sync_inbox (format=metadata; open a message with get_message for the full body). Works for every provider, Outlook included. A subsequent sync_inbox will not trim these older messages back out. If the inbox needs reconnecting, returns needsReconnect/sayToHuman/reconnectUrl instead of fetching. May return { ok:false, busy:true, sayToHuman } instead of fetching, when a sync for this inbox is already running or another load_older_messages call for this same folder is already in flight -- wait a bit and call again rather than retrying immediately. A successful call may also carry a note field (e.g. when added:0 but exhausted:false: nothing new this call, but more may still be older) -- read it and call again to continue rather than treating that as "nothing left".

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>",
      "folder": "<folder>"
    },
    "name": "load_older_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoHow many older messages to try to fetch. Default 50 for Gmail, 25 for iCloud/IMAP. Clamped 1..200 for Gmail, 1..25 for iCloud/IMAP (each message is a separate body download), so call again for more.
folderYesCanonical folder id/name already in this inbox's selected folders (see list_folders / message.folder), not an arbitrary mailbox.
inboxIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only give readOnly/destructive/idempotent/openWorld hints; the description goes far beyond by disclosing per-provider window sizes, the 1000-message cap and refusal behavior, Gmail metadata-first semantics, the guarantee that a later sync_inbox will not trim these messages, and the needsReconnect/busy return envelopes. Each of these is a substantive behavioral trait not derivable from the structured fields.

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 action and scope, then layered constraints and failure modes. It is dense and parenthetical-heavy, but nearly every clause carries operationally relevant information; only minor tightening of the nested asides is possible.

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 still covers the non-obvious return cases (needsReconnect/sayToHuman/reconnectUrl, { ok:false, busy:true }, and the `note` field) plus the 1000-message ceiling. For a stateful, provider-varying tool this is sufficient for correct invocation and follow-up.

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 67% and the schema already documents count clamping and per-provider defaults. The description reinforces the folder constraint ("exactly one folder of one inbox", not an arbitrary mailbox) but adds no syntax or format detail for inboxId or count beyond the schema, so it sits at the baseline.

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?

"Fetches messages older than the current synced window for exactly one folder of one inbox" gives a specific verb, resource, and scope, and explicitly contrasts with the default sync window used by other folders. An agent can distinguish this from sync_inbox 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?

It states the condition for use (extend one folder's history), the alternatives it is not (sync_inbox / default sync window), the hard stop (refuses past 1000 per folder), and the retry protocol when busy or when a `note` says exhausted:false. When-to-call, when-not-to, and what-to-do-instead are all covered.

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