Skip to main content
Glama

List chat messages

list_chat_messages
Read-onlyIdempotent

List room messages oldest to newest, 50 per page. Replies are included; threadId reads one discussion. beforeMessageId pages back, afterMessageId forward. To wait for new messages, receive the chat.message_created event. With webhooks:read, list_events reads them from the event log.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "roomId": "<roomId>"
    },
    "name": "list_chat_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size. Default 50.
roomIdYesChat room ID.
threadIdNoOnly messages in this discussion.
afterMessageIdNoPage forward from this message.
beforeSequenceNoMessages below this sequence.
beforeMessageIdNoPage back from this message.
response_formatNoHow much to return. concise applies when omitted; detailed adds every field and the full text.

Output Schema

NameRequiredDescriptionDefault
hintNoA tip on reading cut text in full or on a faster way to do this. Sent only when one applies.
hasMoreNotrue when another page exists.
messagesYesThis page of results.
nextCursorNoPass as cursor for the next page. Null or absent on the last page.
nextAfterMessageIdNoNewest message on this page. Pass it as afterMessageId to page forward. Null on an empty page.
nextBeforeMessageIdNoOldest message on this page. Pass it as beforeMessageId to page back. Null on an empty page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds value beyond that: result ordering, default page size, bidirectional paging mechanics, and the permission scope needed for the event-log alternative.

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

Conciseness4/5

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

The ordering and page-size facts are front-loaded, then paging, then the polling alternative. It is dense and telegraphic in places ("threadId reads one discussion"), but every sentence carries information.

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 annotations, a full output schema, and 100% parameter coverage all supplied, the description only needs to add ordering, paging, and the polling-versus-events decision, and it does all three. An agent has everything required to page correctly and pick the event path when appropriate.

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 coverage is 100%, so every parameter including limit, threadId, and the paging cursor is already documented in the schema. The description reinforces that threadId reads a single discussion and that before/afterMessageId page backward/forward, but adds little syntax or constraint detail the schema does not already carry. Baseline 3 applies.

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?

The description states a specific verb and resource ("List room messages") plus concrete scope details: oldest-to-newest ordering, 50 per page, and replies included. It clarifies the thread sub-mode but never names or contrasts with the obvious keyword sibling search_chat_messages, so an agent must infer that boundary.

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?

It gives a clear condition-based alternative: to wait for new messages, use the chat.message_created event, and notes that with webhooks:read, list_events reads them from the event log. That is genuine when/when-not routing, but no guidance is offered on when to prefer search_chat_messages over a plain listing.

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