Skip to main content
Glama

Index chat

tg_index_chat

Index a Telegram chat's file metadata in the background, incrementally by default, so you can search files and compare chats offline afterward.

Instructions

Scan a chat in the background and store all its file metadata in the local index (incremental: only new messages since the last scan unless full=true). Afterwards tg_search_files and tg_compare_chats work offline.

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": {
      "chat": "<chat>"
    },
    "name": "tg_index_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesChat: @username, username, t.me link, t.me/c/<id> link, or numeric id such as -100123…
fullNoRescan from the beginning
accountNoAccount id (see tg_list_accounts). Defaults to the default account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, it discloses that scanning happens in the background, that the index is local, and that runs are incremental by default. That is useful behavioral context for a non-read-only operation, though it does not mention performance limits, permissions, or failure behavior.

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?

Two compact sentences, with the core action and incremental default front-loaded and the downstream benefit placed afterward. There is no 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 three-parameter indexing tool with no output schema, the description covers the main action, side effect, incremental behavior, and downstream purpose. It is close to complete, with only secondary operational details like scale or permissions left unstated.

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?

Schema coverage is already 100%, so the schema documents chat, full, and account in detail. The description reinforces the incremental-versus-full distinction but does not add much parameter meaning beyond what the schema already states.

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?

The description states a specific verb and resource ('Scan a chat') plus the concrete outcome: storing file metadata in the local index. It also distinguishes the tool's role by naming the downstream tools that depend on it, tg_search_files and tg_compare_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?

It gives clear usage context by explaining that this indexing step is what enables later offline search and comparison. It also clarifies incremental behavior and the full=true override, though it does not explicitly name alternatives such as tg_index_status or state when not to index.

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