Skip to main content
Glama

search_messages

Search message history by text query, optionally within a single chat, to find relevant messages across Telegram conversations.

Instructions

Full-text search over message history. With chat, searches that one chat; without it, searches every chat this account can see. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNoOptional: restrict to one chat.
limitNoMax results, capped at 200. Default 30.
queryYesText to search for.
sinceNoIgnore messages older than this ISO-8601 date (global search only).
beforeNoIgnore messages newer than this ISO-8601 date (global search only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

The annotation block is empty, so the description carries the burden of behavioral disclosure. It explicitly states 'Read-only', which tells the agent the operation is safe and non-mutating, and it clarifies that scope is limited to chats the account can see. It does not mention rate limits, pagination, or result ordering, but the read-only declaration covers the primary safety concern.

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?

Three short sentences, each earning its place: the core action, the scoping behavior, and the safety trait. The most decision-relevant information is front-loaded. No redundant 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?

For a search tool with five fully documented parameters, the description covers the main facts: what is searched, how scope changes, and that it is read-only. There is no output schema and the description does not describe the return format or sorting, but this is a minor gap given the tool's simplicity.

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 100%, so the baseline is 3. The description adds genuine meaning by explaining that `chat` scopes to one chat, while omitting it triggers a search across all visible chats—this behavioral nuance goes beyond the schema's 'restrict to one chat'.

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 the specific verb 'Full-text search' over 'message history', immediately clarifying the tool's core function. The description further distinguishes between scoped and global search, and 'this account can see' differentiates it from public-chat search siblings.

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?

Clearly explains when to use the tool with and without the `chat` parameter, giving direct scoping guidance. It does not explicitly name alternatives like search_public_chats or state exclusions, so it stops short of full routing guidance.

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