Skip to main content
Glama

Get chat messages

get_chat_messages
Read-only

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": {
      "session_id": "<session_id>"
    },
    "name": "get_chat_messages"
  }
}

Input 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.
on_behalf_ofNoA teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / on_behalf_of / description
      Previous value: -"An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."New value: +"A teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
  2. Changed1 schema field changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

readOnlyHint=true is consistent with the read-oriented wording. Beyond annotations, the description discloses the return shape (title, message count, has_more flag, messages array with role/content/created_at) and explains that has_more is True when older messages remain past this page, which is genuinely useful since there is no output schema. It stops short of saying what "readable" excludes or whether content is truncated.

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?

Organized as a summary plus a returns block, with the prerequisite workflow front-loaded in the first sentence. Every sentence carries either routing or return-shape information; no filler.

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?

With no output schema, the description carries the burden of describing the response and does so adequately, including pagination signaling via has_more. The only gap is the unexplained qualifier "readable," which leaves ambiguous whether some message types are filtered out.

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 description coverage is 100%, and the schema already explains limit (max 100, most recent first), offset paging semantics including the offset += limit pattern, session_id, and on_behalf_of account scoping in detail. The description adds only the has_more linkage to paging, so the baseline 3 is appropriate.

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 verb and resource ("Retrieve readable messages from a past chat session") and explicitly contrasts itself with search_chat_history, telling the agent that tool locates the session_id while this one reads the conversation. The distinction from the closest sibling is clear without opening either schema.

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?

Gives an explicit two-step workflow: call search_chat_history first to obtain session_id, then call this tool to read. That names the alternative and the condition that selects it, leaving nothing to inference.

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