Skip to main content
Glama

Read messages

get_messages
Read-only

Reads one chat chronologically with pagination, time ranges, search context, and media filters so AI can review past messages and draft replies.

Instructions

Read one chat in chronological order, one line per message ([ref], #id, date UTC, sender, text).

Without since/around_message_id you get the newest limit messages (the right call for "latest from X" or drafting a reply). around_message_id: the context of a search hit. before_message_id / after_message_id: the limit messages just before or after that one, to page through history; after_chat: the chat of the after_message_id message when the paging note names one. since/until: a time range like "7d" or "2026-09-01". limit: at most 300. topic: forum topic id or title. media: only messages with an attachment, to list shared files: "files" (photos, videos, documents, voice, audio), "any", or one of photo, video, document, voice, audio, sticker, poll, link.

Input Schema

NameRequiredDescriptionDefault
chatYes
limitNo
mediaNo
sinceNo
topicNo
untilNo
after_chatNo
after_message_idNo
around_message_idNo
before_message_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 openWorldHint=false, so the safety profile is covered. The description adds useful operational context beyond that: the hard cap of 300 on limit, the default window behavior when no range filter is supplied, and the exact rendered line format. It does not discuss pagination edge cases beyond the paging notes, keeping it at a 4.

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?

Front-loads the core behavior and output format, then breaks parameter guidance into compact clauses that each convey distinct information. Slightly dense as a single paragraph, but no sentence is redundant; a light bulleted layout would push it to a 5.

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?

For a 10-parameter read tool, the description covers default behavior, range filtering, paging direction, media filtering, and result format, and an output schema exists to cover return structure. An agent has everything needed to select the right argument combination on the first try.

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 0%, so the description must carry all parameter meaning and it largely does: limit's 300 cap, since/until format examples ('7d', '2026-09-01'), after_chat's role tied to the paging note, topic accepting id or title, and media's full enum including the 'files'/'any' aggregates. Only `chat` itself is left undefined, which is self-evident given the stated purpose.

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 ('Read one chat in chronological order') and specifies the exact output shape (one line per message with ref, id, date UTC, sender, text). This distinguishes it from list_chats and search_messages, which do not return per-message text in that form, and the mention of 'the context of a search hit' implicitly positions it against search_messages.

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 routes between modes: no since/around means newest `limit` messages, 'the right call for "latest from X" or drafting a reply'; around_message_id for search-hit context; before/after_message_id for paging history; since/until for time ranges. Each parameter's use case is stated so the agent can pick the right call without inference.

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