Search Telegram and TON docs
search_telegram_docsSearch official Telegram and TON documentation for API, bot, Mini App, TDLib, or library questions before coding. Returns matching sections with URLs and offsets for verification.
Instructions
Find the official documentation sections that answer a Telegram or TON development question.
Use it before writing or reviewing code that calls the Bot API, Mini Apps JS, Telegram API/MTProto, TDLib, TON Connect, Tolk contracts or the aiogram, python-telegram-bot and grammY libraries. Returns up to limit sections with page URL, heading, excerpt, document_offset and freshness. Excerpts are partial: open the page with get_telegram_document at document_offset before relying on details. Stale matching pages are re-fetched first. An empty result is not proof that a feature does not exist; if the cache is empty, the response suggests pages to fetch.
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_telegram_docs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| area | No | Limit results to one documentation area; empty searches all areas. Core Telegram docs rank above library docs unless the query names a library. | |
| limit | No | Maximum number of matching sections to return. | |
| query | Yes | Exact API names or short English keywords work best, e.g. 'InlineKeyboardButton style', 'sendVideoNote', 'ton_proof', 'jetton transfer', 'aiogram Router callback_query'. Common Russian feature words (кнопка, кружок, кошелек) are expanded automatically. |