Skip to main content
Glama

receive_messages

Retrieve unread messages for an agent, oldest first, with an optional wait. Messages stay unread until marked, supporting reliable task exchange.

Instructions

Return available unread messages addressed to AGENT_ID, oldest first.

Messages actively claimed by another server process are hidden. Waits up to wait_seconds, capped at MAX_WAIT_SECONDS (30). Messages stay unread until mark_read. Each message carries response_deadline, claim_expires_at and owned_by_current_worker; cursor is the last returned id, or None.

Input Schema

NameRequiredDescriptionDefault
limitNo
wait_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/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 a solid job: it discloses claim-hiding, the wait cap of MAX_WAIT_SECONDS (30), non-destructive read semantics (stays unread until mark_read), and per-message metadata fields. However, it omits auth/AGENT_ID resolution, empty-result behavior, and any error or timeout semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the core action, which is good. But the trailing "cursor is the last returned id, or None" sentence does not fit an input-side description and is partly redundant given the tool has an output schema, so it does not fully earn its place.

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

Completeness4/5

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

For a two-parameter, no-annotation polling tool, the description covers the essential pull semantics: claimed messages are hidden, the wait cap, and unread persistence. The output shape is already covered by the output schema, and the only meaningful gap is the undocumented limit parameter.

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 description coverage is 0%, so the description must compensate. It explains wait_seconds including the hard cap, but says nothing about limit, its default of 20, or what happens if limit is exceeded; "cursor is the last returned id" refers to an output field, not a parameter, so it does not help parameter use.

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?

States a specific verb and resource with scope: "Return available unread messages addressed to AGENT_ID, oldest first." The unread/address-to-this-agent scope and the oldest-first ordering distinguish it from siblings like claim_message and mark_read, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: messages claimed by another process are hidden, and "messages stay unread until mark_read" hints at the follow-up tool. There is no explicit statement of when to choose this over listener or claim_message, so the agent must infer the routing.

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