Skip to main content
Glama

search_messages

Read-only

Search one permitted Telegram chat's history by keyword and get paged message previews. Returns truncated preview hits with verified IDs for building reusable references.

Instructions

Native Telegram text search inside ONE allowed chat, across its history, returning a page (default 50, maximum 100) of Telegram-truncated previews. Not global search; no hashtag or from: filter modes. Results are not a complete export. Preview-only hits have previewOnly:true; only IDs independently verified by the UI yield reusable references. Use chatId or cached native chat name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNo
limitNo
queryYes
chatIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.3

TDQS

A4.4/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, non-idempotent, openWorld), but the description adds genuinely useful behavior: pagination defaults/limits, that results are Telegram-truncated previews rather than full content, and that previewOnly:true hits are not reusable references unless UI-verified. That preview-vs-verified distinction is a non-obvious trait an agent would otherwise get wrong.

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-loaded with the core purpose, and every sentence is load-bearing with no filler. The heavy use of semicolon-joined clauses packs a lot into few sentences, which slightly reduces scannability but wastes nothing.

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?

There is no output schema, so the description must explain the return shape, and it does: page size, truncated previews, the previewOnly flag, and the caveat that only UI-verified IDs yield reusable references. Combined with the scope and filter limitations, an agent has everything needed to call it correctly.

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 parameter meaning, and it largely does: it documents the limit default/maximum ('default 50, maximum 100') and explains the chat selector choice ('Use chatId or cached native chat name'). It doesn't clarify the query string's constraints or the distinction between the 'chat' and 'chatId' fields beyond that single hint.

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+resource+scope: 'Native Telegram text search inside ONE allowed chat, across its history'. It explicitly distinguishes itself from siblings by negating what it is not ('Not global search'), which separates it from collect_messages, get_history, and any global search variant.

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?

Gives clear when-not guidance ('Not global search; no hashtag or from: filter modes') and sets expectations ('Results are not a complete export'), which nudges the agent toward an export/collect tool for full dumps. However, it never names the specific alternative tool to use instead, so routing is implied rather than explicit.

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