Skip to main content
Glama
salto-agancy

Telegram MCP

by salto-agancy

Search messages globally

search_messages_globally
Read-onlyIdempotent

Search all Telegram chats simultaneously using comma-separated terms, with optional filters by date, chat type, and public status. Retrieve matching messages and metadata in one response.

Instructions

Search all Telegram chats at once (not scoped to one chat). Comma-separated query terms; optional filters by date, chat kind, and public username. Success: message list and metadata dict. Global search ignores include_total_count. Full documentation: https://github.com/leshchenko1979/fast-mcp-telegram/blob/main/docs/Tools-Reference.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum messages to return (recommended 50 or less).
queryYesSearch terms, comma-separated for multiple terms (OR-style global search). Required.
publicNoIf true, prefer chats with a public username; if false, without. Does not apply to private DMs. Omit to skip this filter.
sourceNoWhere global search looks: 'auto' (default) also searches the local archive when one is configured, which makes voice transcripts, recognised screenshot text and attachment names findable; 'live' searches Telegram only; 'archive' searches the local projection only. With no archive configured, all three behave identically.auto
max_dateNoInclusive maximum date filter (ISO 8601 date or datetime). Omit for no upper bound.
min_dateNoInclusive minimum date filter (ISO 8601 date or datetime). Omit for no lower bound.
chat_typeNoComma-separated chat kinds: private, bot, group, channel. Case-insensitive; extra spaces allowed.
auto_expand_batchesNoExtra search batches to run when filters narrow results. Higher values may return more matches at the cost of latency.
include_total_countNoIf true, response may include total_count where supported (per-chat search; ignored for global search).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.35.0
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "auto",
      +  "description": "Where global search looks: 'auto' (default) also searches the local archive when one is configured, which makes voice transcripts, recognised screenshot text and attachment names findable; 'live' searches Telegram only; 'archive' searches the local projection only. With no archive configured, all three behave identically.",
      +  "type": "string"
      +}
  2. First observedv0.34.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, covering the safety profile. The description adds the global-scope constraint and notes that include_total_count is ignored, but these details also appear in the input schema; no new behavioral risks or side effects are disclosed. Moderate value beyond annotations.

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?

Five short sentences with the main purpose front-loaded and a documentation link at the end. All sentences are purposeful, though mentioning 'Success: message list and metadata dict' is somewhat redundant given the output schema.

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?

Given the rich input schema, output schema, and annotations, the description is complete enough for correct invocation. It adds global-scope context, a key parameter caveat, and a documentation link; no critical operational detail is missing.

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

Parameters3/5

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

Input schema has 100% description coverage, so the baseline is 3. The description's mention of comma-separated terms and optional filters by date, chat kind, and public username only mirrors schema content without adding new parameter semantics.

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 action and resource: 'Search all Telegram chats at once', explicitly contrasting with chat-scoped searches. It also summarizes the query format and optional filters, making the tool's purpose immediately distinguishable from siblings like get_messages or find_chats.

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?

Provides clear context that this tool performs cross-chat global search and is 'not scoped to one chat', which implies it is the right choice for broad message search. However, it does not explicitly name alternatives or state when not to use it, so it stops short of a 5.

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