Skip to main content
Glama

search_messages

Find messages by full-text query in a specific Telegram chat or across all chats, with optional limits on results.

Instructions

Full-text search in one chat or across all chats (chat='').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatNo
limitNo
queryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden, and it discloses almost nothing: no statement that this is a read-only/non-mutating operation, no note on result ordering or relevance, no mention of how limit affects retrieval or pagination. An output schema exists so return shape need not be described, but the operational behavior is essentially undocumented.

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?

A single front-loaded sentence with zero filler and the key scoping trick parenthesized where it is easy to spot. It is efficient, though the terseness contributes to the specification gaps noted elsewhere rather than purely helping.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Three parameters with no schema descriptions, no annotations, and no output-schema explanation needed for a search tool — the description should say far more than one line. Missing are query syntax, limit behavior, and any indication of what permissions or scopes are needed to search across all chats.

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

Parameters2/5

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

With 0% schema description coverage, the description must explain all three parameters and only covers one: it clarifies that chat='' means search across all chats, which is genuinely useful. The 'query' parameter's syntax (phrases, operators, tokenization) and the 'limit' parameter's meaning and bounds get no explanation at all.

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?

States a specific verb and resource (full-text search over messages) and clarifies the scoping axis — one chat vs. all chats. It is distinguishable from search_chats and read_messages implicitly, but never names a sibling, so differentiation is left 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?

The scope hint ('one chat or across all chats') implies when this tool is appropriate instead of read_messages or search_chats, but there is no explicit when-to-use, when-not-to-use, or alternative-routing guidance.

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