Check a bot project
check_telegram_projectScans a Python Telegram bot project to validate Bot API calls against the official schema and returns errors and warnings for invalid, unknown, or retired methods and parameters. Use before upgrades.
Instructions
Check every Bot API call in a Python bot project (aiogram, python-telegram-bot, pyTelegramBotAPI, raw HTTP requests) against the current official schema in one run.
Use it after changing an existing bot, before an upgrade, or when asked to review a bot: it reads the whole project locally and returns only findings, so the documentation does not have to enter the context. Errors: values outside the documented list (for example style="red"), unknown methods or parameters in raw API requests. Warnings: parameters Telegram retired, with the Bot API version and changelog entry that replaced them; keyword arguments that are neither Bot API parameters nor known library options; bot methods with no Bot API counterpart. It does not run code, follow variables or check required parameters. Returns findings ({file, line, severity, call, message}), errors, warnings, files_scanned, declared libraries with versions and bot_api_version. To check one request instead use check_bot_api_call. The same check runs in a shell or CI as telegram-dev check PATH.
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": {
"path": "<path>"
},
"name": "check_telegram_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the bot project directory or a single Python file on this machine. | |
| exclude | No | Glob patterns relative to path to skip, e.g. ['tests/*', 'migrations/*']. | |
| max_findings | No | Maximum number of findings to return; totals always count everything. |