send_sticker
Send stickers to Telegram chats using file IDs or URLs. Specify chat ID and sticker source, with optional silent delivery.
Instructions
Send a sticker to a Telegram chat.
Args: chat_id: Target chat ID. sticker: File ID or URL of the sticker (WEBP/TGS/WEBM). disable_notification: Send silently.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | ||
| sticker | Yes | ||
| disable_notification | No |
Implementation Reference
- aiogram_mcp/tools/media.py:317-360 (handler)Handler implementation for send_sticker tool.
@mcp.tool async def send_sticker( chat_id: int, sticker: str, disable_notification: bool = False, ) -> SendMediaResult: """Send a sticker to a Telegram chat. Args: chat_id: Target chat ID. sticker: File ID or URL of the sticker (WEBP/TGS/WEBM). disable_notification: Send silently. """ if not ctx.is_chat_allowed(chat_id): result = SendMediaResult(ok=False, error=f"Chat {chat_id} is not allowed.") if ctx.audit_logger: ctx.audit_logger.log( "send_sticker", {"chat_id": chat_id, "sticker": sticker}, result.ok, result.error, ) return result try: if ctx.rate_limiter: await ctx.rate_limiter.acquire() msg = await ctx.bot.send_sticker( chat_id=chat_id, sticker=sticker, disable_notification=disable_notification, ) result = SendMediaResult(ok=True, message_id=msg.message_id, chat_id=msg.chat.id) except (TelegramBadRequest, TelegramForbiddenError) as exc: result = SendMediaResult(ok=False, error=str(exc)) if ctx.audit_logger: ctx.audit_logger.log( "send_sticker", {"chat_id": chat_id, "sticker": sticker}, result.ok, result.error, ) return result - aiogram_mcp/tools/media.py:315-315 (registration)Conditional registration logic for the send_sticker tool.
if allowed_tools is None or "send_sticker" in allowed_tools: