Skip to main content
Glama

Get Chat History

ethora-chats-history-v2
Read-only

Retrieve archived chat-room messages from Ethora by app and chat ID, with pagination for older messages. Use it to read history, audit conversations, or backfill UI.

Instructions

Read the archived messages of a chat room (GET /v2/apps/:appId/chats/:chatId/messages, newest last). Returns results with from, nick, body, ts (ms) plus a nextBefore cursor for older pages. Identify the room by roomJid (${appId}_${chatId}) or bare chatId plus the selected app. Requires: a room in the selected app (ethora-app-create-chat). Auth: user auth (default on the hosted server) or B2B; app-token mode is not accepted. Errors: 401 not logged in; 403 not the app owner; 404 unknown app/room; 502 MAM_READ_FAILED or mamUnavailable: true when the deployment has no message archive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdNo24-char hex appId. Optional when `roomJid` carries it or an app is selected.
limitNoMaximum number of most-recent messages to return (default 100).
beforeNoPagination cursor: only messages older than this timestamp (ms), from a previous `nextBefore`.
chatIdNoBare chat id. Needs an app: pass `appId` or select one with `ethora-app-select`.
roomJidNoRoom JID `${appId}_${chatId}` (optionally with `@conference.<host>`). Either this or `chatId` is required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv26.9.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description goes far beyond that by detailing the exact return structure (results fields, nextBefore cursor), the auth requirements (user/B2B vs app-token), and a comprehensive list of error codes with specific causes (including 502 MAM_READ_FAILED and mamUnavailable). This gives the agent full visibility into behavior without needing to probe the endpoint. No contradictions with annotations.

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 detailed but every sentence contributes. It opens with the core purpose and endpoint, then moves to return format, identification, prerequisites, auth, and errors. It is well-structured with clear separations (Requires, Auth, Errors) and avoids redundant fluff. The length is justified by the complexity of the tool (pagination, multiple auth modes, and error handling) without being bloated.

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 having no output schema, the description fully describes the return payload and cursor mechanism. It covers prerequisites (room must exist), auth modes, error conditions, and pagination details. For a read-only paginated history endpoint, everything an agent needs to correctly invoke and interpret results is present. The only minor omission is a note on rate limiting or ordering beyond 'newest last', but these are not critical for correct usage.

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 coverage is 100%, and each parameter already has a descriptive explanation. The description adds substantial value by explaining the relationship between roomJid and appId/chatId, the default limit (100), the semantics of the 'before' cursor (older than timestamp), and the optionality of appId when roomJid carries it. This goes beyond simple field names and gives operational context that is not in the 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 verb ('Read'), a clear resource ('archived messages of a chat room'), and gives the exact HTTP endpoint. It explicitly contrasts with siblings like ethora-chats-message-v2 (sending) and ethora-messages-search-v2 (searching), making its purpose unambiguous. The phrase 'newest last' further clarifies the ordering semantics.

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 states the prerequisite of a room in the selected app and explains how to identify the room via roomJid or chatId plus app. It also lists auth modes that are and are not accepted. While it doesn't explicitly say 'when not to use this tool,' the inclusion of the sibling search tool and the phrase 'archived messages' implies it is for history retrieval, not live or search operations. This is clear enough for an agent to make the right call.

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

Deploy Server

Other Tools