Skip to main content
Glama

fetch_session_inbox

Read or drain your session inbox by retrieving newest-first messages, including bodies when needed; preview unread receipts without marking them read.

Instructions

Return one newest-first page across registrations matching your host/session tag or T3 thread. Use machine-derived host and session_id, with t3_thread when known; never guess from an agent name. Each receipt includes project_key and agent_name for replies and acknowledgements. Defaults: unread_only:true, mark_read:true, include_bodies:false, limit:20. To drain, include bodies; stop when fewer than limit messages return (default 20, capped at 1000), repeating only after a full page. With mark_read:false or unread_only:false, this is a bounded preview, not a drain. The CLI swarmail inbox --session discovers identity and drains without mailbox arguments. Swarmail is a trusted local service; session identity selects inboxes and is not authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesHost tag, such as claude, codex, cursor, devin, opencode, grok or agy.
limitNoPositive page size; default 20, capped at 1000.
mark_readNoDefault true. False previews without marking receipts read.
t3_threadNoYour T3 thread ID when known; includes older provider registrations in that thread.
session_idYesYour native host session ID from its shell variable or registration.
unread_onlyNoDefault true. False gives a bounded page including read receipts.
include_bodiesNoInclude each body_md; default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (which only say readOnlyHint=false, idempotent=false), the description discloses the mutating side effect of the default mark_read:true, all four defaults, the drain semantics and termination condition, and the security model ('trusted local service; session identity selects inboxes and is not authentication'). This is unusually rich behavioral context for a fetch tool.

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?

The purpose is front-loaded in sentence one and subsequent sentences carry operational payload (defaults, drain algorithm, auth model). It is dense and a couple of clauses (e.g. the receipt project_key/agent_name note) are lower-value, but nearly every sentence earns its place given the absence of an output schema.

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 ('Each receipt includes project_key and agent_name for replies and acknowledgements'), the pagination/drain model, and the identity/auth assumptions. For a 7-param, session-scoped fetch tool this is complete enough to invoke correctly.

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 already documents each parameter, establishing a baseline of 3. The description meaningfully adds semantics: it states defaults inline, explains limit's drain-loop implication (fewer than limit returned = done, capped at 1000), and clarifies t3_thread is used 'when known' and that host/session_id must be machine-derived rather than guessed.

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

Purpose4/5

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

The opening sentence states a specific verb (Return), resource (one newest-first page), and scope (registrations matching your host/session tag or T3 thread), which makes the tool's remit clear. It stops short of naming the sibling fetch_inbox to explicitly differentiate, but the session-scoped framing is unambiguous.

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 gives explicit when-to-use and how-to-use guidance: prefer machine-derived host/session_id and t3_thread 'when known', 'never guess from an agent name', and the drain loop ('stop when fewer than limit messages return... repeating only after a full page'). It also states the negative case: with mark_read:false or unread_only:false it is 'a bounded preview, not a drain'.

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