set_chat_description
Update group or channel descriptions in Telegram bots to maintain accurate information and improve user engagement.
Instructions
Change the description of a group or channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | ||
| description | Yes |
Implementation Reference
- aiogram_mcp/tools/chats.py:230-250 (handler)The handler function for set_chat_description tool.
async def set_chat_description(chat_id: int, description: str) -> OkResult: """Change the description of a group or channel.""" if not ctx.is_chat_allowed(chat_id): result = OkResult(ok=False, error=f"Chat {chat_id} is not allowed.") if ctx.audit_logger: ctx.audit_logger.log( "set_chat_description", {"chat_id": chat_id, "description": description}, result.ok, result.error, ) return result try: if ctx.rate_limiter: await ctx.rate_limiter.acquire() await ctx.bot.set_chat_description(chat_id=chat_id, description=description) result = OkResult(ok=True) except (TelegramBadRequest, TelegramForbiddenError) as exc: result = OkResult(ok=False, error=str(exc)) - aiogram_mcp/tools/chats.py:229-230 (registration)Registration of the set_chat_description tool using the @mcp.tool decorator.
@mcp.tool async def set_chat_description(chat_id: int, description: str) -> OkResult: