get_bot_info
Retrieve metadata about the current Telegram bot, including its configuration and operational details.
Instructions
Return metadata about the current Telegram bot.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- aiogram_mcp/tools/users.py:46-62 (handler)Implementation of the get_bot_info tool which fetches metadata about the Telegram bot.
@mcp.tool async def get_bot_info() -> BotInfoResult: """Return metadata about the current Telegram bot.""" me = await ctx.bot.get_me() result = BotInfoResult( ok=True, id=me.id, username=me.username, first_name=me.first_name, is_bot=me.is_bot, can_join_groups=me.can_join_groups, can_read_all_group_messages=me.can_read_all_group_messages, supports_inline_queries=me.supports_inline_queries, ) if ctx.audit_logger: ctx.audit_logger.log("get_bot_info", {}, result.ok, result.error) return result