Skip to main content
Glama

get_recent_messages

Read-only

Read a page of recent messages from one allowed Telegram chat by chat ID or cached name, including message and attachment references for review.

Instructions

Read a useful page (default 50, maximum 100) of latest rendered messages from one allowed chat. Supply exactly one of chatId or chat (unique cached native Telegram name); name resolution is local in this same call. Rechecks exact hash/header identity and newest UI marker. Stable references target full messages and attachments; follow the returned next call for older history. Pages use a 16 KiB JSON budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNo
limitNo
chatIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.3

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, open-world), and the description adds real context beyond them: default/max page size, a 16 KiB JSON budget, local name resolution within the same call, and identity re-verification against hash/header markers. The phrase 'Rechecks exact hash/header identity and newest UI marker' is unexplained jargon the agent cannot act on, which keeps this from a 5.

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?

Purpose is front-loaded in the first clause, followed by the exclusivity rule, then behavioral detail, then the fallback for older history — a sensible ordering with little waste. The hash/header/UI-marker sentence is dense and unclear, spending words without conveying actionable meaning.

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 steps up by describing stable references to full messages and attachments and by telling the agent to follow the returned next call for older history, which covers the essentials of the return shape. Error behavior for an unauthorized or unresolvable chat is not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load and largely does: it states the mutual exclusivity of chatId and chat, defines 'chat' as a unique cached native Telegram name resolved locally, and documents the limit default of 50 with a maximum of 100. It does not explain the opaque 16 KiB budget against the limit value, leaving one semantic loose end.

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 first sentence names a specific verb and resource ('Read ... latest rendered messages from one allowed chat') and scopes it with a page size, so the agent knows this is a latest-messages fetch rather than a search or history walk. It doesn't explicitly name siblings like search_messages or get_history, leaving the boundary to inference.

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?

'Supply exactly one of chatId or chat' and 'follow the returned next call for older history' give concrete operating rules, but there is no statement of when to prefer this tool over search_messages, collect_messages, or get_history. Usage is implied by 'latest' rather than explicitly contrasted with alternatives.

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