Skip to main content
Glama

get_session_messages

Read-onlyIdempotent

Retrieve paginated messages from a recorded session. Read conversation content after discovery, with text truncated to 1000 characters per message to control token usage.

Instructions

Read the actual messages from a session (paginated).

Use this after finding a session with the discovery tools to read its content. Each text part is hard-truncated to 1000 chars to control token budget. Tool calls return only name + status (not output). File/base64 parts are skipped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax messages to return (default 10, max 50)
offsetNoPagination offset (for reading beyond the first page)
session_idYesThe session ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Adds significant behavioral details beyond the readOnly/idempotent annotations: hard truncation to 1000 chars, tool calls returning only name+status (not output), and file/base64 parts skipped. This is essential operational context that cannot be inferred from annotations or schema.

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 concise and front-loaded. The first sentence states the action, the second gives usage context, and the remaining sentences list critical constraints. Every sentence adds value, with no redundancy or filler.

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 read-only annotations, a complete input schema, and an output schema, the description covers the necessary context: when to use, pagination, output limitations, and content skipping. It is sufficient for an agent to correctly select and invoke the tool without ambiguity.

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?

The input schema already provides complete descriptions for all parameters (100% coverage). The description repeats the pagination concept but adds no new parameter-specific details. Since the schema carries the parameter documentation, baseline 3 applies.

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 verb 'Read' and the resource 'actual messages from a session', distinguishing it from sibling discovery and detail tools. It immediately conveys the tool's core function and scope.

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

Usage Guidelines4/5

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

Explicitly instructs to use after session discovery and describes pagination behavior. It gives clear context for when to invoke, though it does not explicitly list when not to use it. The phrasing 'after finding a session' strongly implies the appropriate workflow.

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/crottolo/opencode-history-mcp'

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