Skip to main content
Glama

Get Chat Messages

get_chat_messages
Read-only

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of messages to return (default 50, max 100). Most recent messages are returned.
offsetNoSource messages to skip for paging (default 0). offset counts the underlying session messages (newest first), so re-call with offset += limit to page into older history while `has_more` is True.
session_idYesThe ID of the chat session to retrieve messages from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds genuinely useful behavior: it returns a dict with title, message count, has_more, and ordered messages, plus notes that has_more indicates older messages remain. No contradiction. It doesn't discuss failure modes, but with readOnly covered and return shape documented, 4 is appropriate.

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?

Short, front-loaded summary followed by a compact returns spec. Every sentence earns its place; there is no filler or repetition of schema details.

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?

Despite no output schema, the description documents the return dict and paging semantics. For a simple 3-param read tool with a required session_id and detailed schema descriptions, nothing essential is missing.

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 covers all three params in detail (limit default/max, offset paging, session_id), so baseline is 3. The description adds value by explaining where session_id comes from (search_chat_history), which is not in the schema and helps correct invocation.

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?

States a specific operation ('Retrieve readable messages') on a clear resource ('a past chat session'), and the workflow mention of search_chat_history distinguishes it from the sibling search tool. An agent can tell this is the read-after-search step without opening schemas.

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?

Explicitly instructs to call search_chat_history first to obtain the session_id, then use this tool to read the conversation. This gives a concrete when-to-use and names the relevant alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources