Skip to main content
Glama

Search local index

tg_search_files
Read-only

Search files across indexed Telegram chats without contacting Telegram by name/caption words, chat, file kind, extension, or size, then sort results by date, size, or name.

Instructions

Search files across all indexed chats WITHOUT contacting Telegram: by words in name/caption, chats, kinds, extensions and size; sort by date, size or name.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tg_search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNodate
chatsNoLimit to these chats
limitNo
queryNoWords that must all appear
typesNoFile kinds. Default: everything except stickers.
fieldsNoKeep only these fields in list items (e.g. ["message_id","name","size"])
formatNocompact = lists as {columns, rows} tables; saves a lot of context for long listingsjson
accountNoAccount id (see tg_list_accounts). Defaults to the default account.
extensionsNoExtensions, e.g. ["zip", "mp4"].
max_size_mbNo
min_size_mbNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful context that the search runs purely against the local index and does not hit Telegram, but it says nothing about result caps, staleness of the index, or pagination.

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 dense sentence that front-loads the key constraint ('WITHOUT contacting Telegram') and then lists the filter dimensions. Every clause carries information, though the compound listing is slightly harder to scan than a short structured breakdown would be.

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

Completeness3/5

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

For an 11-parameter, zero-required tool with no output schema, the description covers the filtering story well but omits the output-shaping parameters (limit, fields, format) and the account selector. An agent can call it correctly, but may miss the levers that keep long listings from flooding context.

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 coverage is 64%, and the description meaningfully maps the main filters: 'words in name/caption' to query, 'chats' to chats, 'kinds' to types, 'extensions' and 'size' to the size bounds, and sort fields to sort. It does not explain limit, fields, format, or account, which are exactly the parameters that affect output volume and context cost.

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 ('Search files across all indexed chats') and enumerates the search dimensions (name/caption words, chats, kinds, extensions, size) plus sort options. It is clearly a local-index file search, but it never names a sibling such as tg_search_archive or tg_list_files, so differentiation is inferred rather than stated.

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 phrase 'WITHOUT contacting Telegram' implies when this tool is preferred (fast, offline, index-only lookup), but the description never states when to use an alternative search tool or what to do when the index is incomplete. Usage is implied rather than prescribed.

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