Skip to main content
Glama

Get Message Chat

messages_get_chat
Read-onlyIdempotent

Reads a Messages chat oldest-first with tapbacks folded into reacted messages, returning the newest messages and supporting paging back through conversation history.

Instructions

Messages in one chat, oldest first, with tapbacks folded into the message they react to. Returns the newest limit messages; page back with before_id = next_before_id. Use when: reading a conversation

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "messages_get_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoOnly messages after this ISO 8601 date
limitNoMax messages to return
beforeNoOnly messages before this ISO 8601 date
chat_idNochatId from messages_list_chats
before_idNoOnly messages older than this message id (next_before_id from the previous page)
chat_identifierNoPhone, email or group id from messages_list_chats
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable textjson

Output Schema

NameRequiredDescriptionDefault
chatYes
countYes
has_moreYes
messagesYes
next_before_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered; the description adds real behavioral detail on top: ascending ordering, tapback folding, and the fact that the newest `limit` messages are returned with backward pagination. What it does not cover is the shape of the cursor in the response or whether ordering is affected by the `after`/`before` date filters.

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?

Three tight clauses, front-loaded with the result shape and ordering before the pagination mechanics. The trailing 'Use when: reading a conversation' is the weakest segment since it restates the obvious from the opening clause.

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?

An output schema exists, so return values need not be described, and the description covers the non-obvious bits an agent needs: ordering, tapback collapsing, and how to page. It is adequately complete for a nine-field, all-optional read tool, though a note on how date filters interact with the limit window would close the last gap.

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%, so the schema already documents all seven parameters, and the description's mention of before_id = next_before_id largely restates what the schema says for that field. It adds no semantics for chat_id vs chat_identifier or for the markdown response_format beyond what is structured.

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 gives a concrete resource and scope: 'Messages in one chat, oldest first, with tapbacks folded into the message they react to,' which tells an agent exactly what comes back and how it is ordered. It stops short of naming siblings such as messages_search or whatsapp_get_chat, so the differentiation from those alternatives is left implicit.

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

Usage Guidelines3/5

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

'Use when: reading a conversation' supplies a single positive trigger but no exclusions and no alternative named for the overlapping cases (searching across chats, retrieving a single chat's metadata). The pagination hint ('page back with before_id = next_before_id') is operational guidance rather than a when-to-use rule.

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