Skip to main content
Glama

read_messages

Fetch unseen messages from a session to check for task assignments, answers, or updates after sending a response. Use for quick status checks without waiting.

Instructions

Read new messages from a session. Returns only unseen messages (offset-tracked).

AUTOMATIC TRIGGERS - Call this when:

  • Checking for new messages after sending a response

  • Looking for task assignments or answers to your questions

  • Periodic status check during active collaboration

DIFFERENCE from poll_messages: This returns immediately without waiting. Use poll_messages for blocking waits in autonomous agent loops.

WORKFLOW POSITION: Call after sending messages, between work steps.

PARAMETERS:

  • session_id: Session to read from

  • agent_id: Your agent ID (required for authorization and offset tracking)

  • limit: Max messages to return (default: 50, max: 200)

  • msg_types: Filter by message types like ["task", "answer"] (optional)

  • from_agent: Filter by specific sender (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
agent_idYes
msg_typesNo
from_agentNo
session_idYes
Behavior4/5

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

With no annotations, the description carries the transparency burden and does disclose important behavior: offset-tracking, returning only unseen messages, immediate return, and authorization/offset role of agent_id. It could go further by stating whether reading consumes/marks messages as seen and what happens when no messages exist, but the core behavior is clear.

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?

The description is front-loaded with the core definition, then organized into scannable sections (AUTOMATIC TRIGGERS, DIFFERENCE, WORKFLOW POSITION, PARAMETERS). Each section adds distinct value and no sentence is redundant.

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?

The description covers purpose, usage context, sibling differentiation, and all parameters, which is strong for a read operation. The only notable gap is the absence of any return-shape information, which matters because there is no output schema, though the message model is likely known.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description fully compensates by explaining every parameter's role: session_id, agent_id's authorization/offset purpose, limit's default/max, msg_types with an example, and from_agent filtering. This is far beyond the bare schema.

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 states a specific operation ('Read new messages from a session') and a key behavioral differentiator ('Returns only unseen messages (offset-tracked)'). It is clearly distinguishable from sibling tools like poll_messages, tail_messages, and read_message_range.

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 provides explicit AUTOMATIC TRIGGERS with concrete situations, names the relevant alternative (poll_messages), and explains when to choose that alternative ('blocking waits in autonomous agent loops'). Workflow position further clarifies when the tool fits.

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/Vedant9500/OpenLMlib'

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