Skip to main content
Glama

tail_messages

Read the most recent messages from a session to check current activity or state, with no read offset tracking required.

Instructions

Read the last N messages from a session. Quick status check without offset tracking.

AUTOMATIC TRIGGERS - Call this when:

  • You just joined and want to see recent activity

  • Quick glance at what's happening without tracking offsets

  • Checking session state before full context load

DIFFERENCE from read_messages: This does NOT track your read offset and always returns the most recent N messages regardless of what you've seen. Use read_messages for tracking unseen messages.

PARAMETERS:

  • session_id: Session to read from

  • agent_id: Your agent ID (must belong to the session)

  • n: Number of messages (default: 20, max: 100)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
agent_idYes
session_idYes
Behavior4/5

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

With no annotations, the description carries the burden and discloses the central behavioral trait: it does NOT track the read offset and always returns the most recent N messages regardless of prior reads. This makes the lack of side effects clear, though it stops short of describing return ordering or error behavior.

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?

Front-loaded with a one-sentence purpose, then organized into trigger list, read_messages differentiation, and parameter bullets. Every section adds value and the structure makes scanning easy.

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 simple status-check tool with no annotations and no output schema, this covers purpose, usage triggers, differentiation, and parameters. Minor gap: it does not describe the return format or message ordering, but that is not critical for a quick read tool.

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?

The input schema has no textual descriptions (0% coverage), so the PARAMETERS section must compensate. It explains session_id, adds the membership constraint for agent_id, and documents n's default and max. This is helpful, though the descriptions are terse.

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?

Clearly states 'Read the last N messages from a session' and frames it as a 'Quick status check without offset tracking'. It explicitly differentiates from read_messages by noting it does not track the read offset, so an agent can distinguish it from siblings.

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 an explicit 'AUTOMATIC TRIGGERS' list with concrete scenarios: joining a session, quick glance, and checking state before full context load. It also names the key alternative, read_messages, and explains when to use that instead.

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