Skip to main content
Glama

peek_inbox_version

Check mailbox version and unread count to detect new mail without fetching full messages, triggering a full retrieval only when the count changes.

Instructions

Cheap non-mutating mailbox version probe (v2.3.0 Phase 4s, ambient wake support).

When to use: low-rate polling that wants to know 'do I have new mail?' without paying a get_messages round-trip, clients diff total_unread_count against their cached value and only call get_messages on a change. Pair with the optional filesystem-marker wake (when RELAY_FILESYSTEM_MARKERS=1) for low-latency idle wake. For full mailbox content use get_messages (mutating) or get_messages_summary (preview).

Behavior: pure read. Returns { mailbox_id, epoch, last_seq, total_messages_count, total_unread_count }. WATCH total_unread_count for new-mail detection, it advances on every send_message/broadcast to this agent. last_seq only advances when the recipient calls get_messages (read-cursor). epoch rotates on backup/restore, a client whose cached epoch no longer matches MUST reset its local last_seen_seq to 0 and re-drain. Auth: any agent token.

Returns: { success: true, mailbox_id, epoch, last_seq, total_messages_count, total_unread_count }.

Errors: AUTH_FAILED, NOT_FOUND (unknown agent_name), RATE_LIMITED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_nameYesThe agent whose mailbox to observe
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.
Behavior5/5

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

No annotations are provided, so the description carries full burden. It thoroughly discloses: pure read (non-mutating), the semantics of each return field (epoch rotation on backup/restore, last_seq only advances on read-cursor, total_unread_count advances on every send), required reset behavior on epoch mismatch, auth requirements (any agent token), and possible error codes.

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?

Structure is exemplary — sections for when-to-use, behavior, returns, and errors are clearly delineated. Every sentence earns its place; the behavioral semantics around epoch, last_seq, and total_unread_count are dense but essential. No fluff.

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 no-output-schema, no-annotation tool, the description is remarkably complete. It explains error types, auth requirements, the full return shape, subtle cursor/epoch semantics, a concrete usage pattern, and a wake integration. An agent has everything needed to call this correctly and interpret results.

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 100%, so the schema documents both parameters. The description adds context about agent_token ('Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header'), which goes beyond the raw schema. It doesn't add much beyond that, which is acceptable given perfect schema coverage.

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?

The description clearly states the tool's purpose: a 'Cheap non-mutating mailbox version probe' that checks for new mail without a full get_messages round-trip. It explicitly distinguishes from siblings like get_messages and get_messages_summary, and the specific return fields are enumerated.

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?

Provides explicit when-to-use ('low-rate polling that wants to know ‘do I have new mail?’'), how to use it (diff total_unread_count against cached value), a wake integration pattern, and explicit alternatives ('use get_messages (mutating) or get_messages_summary (preview)'). This is model guidance for when-not-to-use too.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Maxlumiere/bot-relay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server