Search local index
tg_search_filesSearch 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
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | date | |
| chats | No | Limit to these chats | |
| limit | No | ||
| query | No | Words that must all appear | |
| types | No | File kinds. Default: everything except stickers. | |
| fields | No | Keep only these fields in list items (e.g. ["message_id","name","size"]) | |
| format | No | compact = lists as {columns, rows} tables; saves a lot of context for long listings | json |
| account | No | Account id (see tg_list_accounts). Defaults to the default account. | |
| extensions | No | Extensions, e.g. ["zip", "mp4"]. | |
| max_size_mb | No | ||
| min_size_mb | No |