leaveChat
Make a Telegram bot leave a group, supergroup, or channel by providing its chat ID or @username; returns True on success.
Instructions
Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
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": {
"chat_id": "<chat_id>"
},
"name": "leaveChat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Unique identifier for the target chat or username of the target supergroup or channel in the format `@username`. Channel direct messages chats aren't supported; leave the corresponding channel instead. |