Skip to main content
Glama

get_messages_summary

Preview mailbox messages and pending backlog counts without marking them read, then use returned IDs to fetch full message content.

Instructions

Cheap, non-mutating mailbox preview (v2.1.6).

When to use: orchestrators scanning many inboxes per cycle, dashboards rendering a per-agent backlog count, or any flow where you want to see what is there without consuming it. After picking interesting IDs, expand them with get_messages (which CAN mutate) or read them by ID.

Behavior: same status + since filter surface as get_messages, with the same status-dependent since default (pending → 'all', history → '24h'). Returns headers + a 100-char content_preview (decrypted on the fly when RELAY_ENCRYPTION_KEY is set). Never marks messages read. Auth: agent token (own mailbox only).

Returns: { summaries: { id, from_agent, priority, status, created_at, content_preview, content_truncated }[], count, has_more, total, total_pending?, hidden_by_since?, agent, filter, since, since_bound }. total is what your window matched; for a pending preview total_pending is the full, unwindowed queue, and hidden_by_since appears when your window hid pending mail. content_truncated=true when the original content exceeded the 100-char preview cap.

Errors: AUTH_FAILED, VALIDATION, RATE_LIMITED.

Input Schema

NameRequiredDescriptionDefault
limitNoMax message summaries to return
sinceNoTime-window filter. Accepts duration ('15m'|'1h'|'24h'|'3d'), ISO8601 timestamp, 'session_start' sentinel, or 'all'/null for no bound. DEFAULT DEPENDS ON STATUS: status='pending' defaults to 'all' (the action queue is never windowed unless you ask); history reads (all/history/read/resolved) default to '24h'. On a pending read the bound applies only to mail this recipient has already seen: never-drained mail is always returned. When a window hides pending mail, the response says so in `hidden_by_since`.
statusNoFilter by status (same surface as get_messages). 'pending' excludes resolved mail (v2.12.0) so the preview agrees with the mutating drain.pending
agent_nameYesYour agent name
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / since / default
      Removed value: -"24h"
    • changedInput schema / properties / since / description
      Previous value: -"v2.1.6: time-window filter over ALREADY-OBSERVED history. Accepts duration ('15m'|'1h'|'24h'|'3d'), ISO8601 timestamp, 'session_start' sentinel, or 'all'/null to disable. Default '24h' trims stale backlog when an agent name is reused. #198: this bound applies ONLY to mail this recipient has already seen — a PENDING drain ALWAYS returns never-observed (undelivered) mail regardless of `since`, so undelivered mail can never age out of reach."New value: +"Time-window filter. Accepts duration ('15m'|'1h'|'24h'|'3d'), ISO8601 timestamp, 'session_start' sentinel, or 'all'/null for no bound. DEFAULT DEPENDS ON STATUS: status='pending' defaults to 'all' (the action queue is never windowed unless you ask); history reads (all/history/read/resolved) default to '24h'. On a pending read the bound applies only to mail this recipient has already seen: never-drained mail is always returned. When a window hides pending mail, the response says so in `hidden_by_since`."
  2. Changed1 schema field changedv3.0.1
    • changedInput schema / properties / since / description
      Previous value: -"v2.1.6: time-window filter. Accepts duration ('15m'|'1h'|'24h'|'3d'), ISO8601 timestamp, 'session_start' sentinel, or 'all'/null to disable. Default '24h' trims stale backlog when an agent name is reused."New value: +"v2.1.6: time-window filter over ALREADY-OBSERVED history. Accepts duration ('15m'|'1h'|'24h'|'3d'), ISO8601 timestamp, 'session_start' sentinel, or 'all'/null to disable. Default '24h' trims stale backlog when an agent name is reused. #198: this bound applies ONLY to mail this recipient has already seen — a PENDING drain ALWAYS returns never-observed (undelivered) mail regardless of `since`, so undelivered mail can never age out of reach."
  3. First observed

TDQS

A4.6/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: non-mutating, never marks messages read, auth limited to own mailbox, decryption behavior, status/since defaults, and error cases are all disclosed.

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?

It is well organized with When to use, Behavior, Returns, and Errors sections and is front-loaded. The return-field enumeration is long but justified because there is no output schema; the version tag is minor overhead.

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?

For a read-only preview with no annotations or output schema, it covers purpose, side effects, auth, filtering defaults, return shape, truncation, and errors. An agent has enough information to call it correctly and interpret the result.

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% and the schema already documents limit, since, status, and token in detail. The description reinforces the status/since filter semantics and cross-references get_messages, but adds little parameter meaning beyond the schema and does not discuss limit.

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: a non-mutating mailbox preview. It explicitly distinguishes itself from get_messages, which 'CAN mutate,' so an agent can route correctly without opening schemas.

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?

Gives explicit when-to-use cases: orchestrator scans, dashboards, and previewing without consuming. It also names the next step and alternative: expand interesting IDs with get_messages or read by ID.

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