set_watched_groups
Replace a telegram_mtproto userbot's watched-groups list — the chats it monitors. Requires the manage_settings permission. SET semantics: send the COMPLETE desired list every time (call list_watched_groups first and include existing entries you want to keep — omitting one removes it). Each entry needs a chatId (e.g. "-100…") or a public username/t.me link, and it must be a group or channel the account has JOINED. Every entry is checked against the account before saving: a username no chat has, a chat the account is not in, or a person/bot refuses the WHOLE list with MTPROTO_WATCHED_INVALID naming each bad row (nothing is saved) — fix the spelling or join the chat with the account, then resend. Confirmed rows come back with checkStatus "ok" and their chat id and title filled in; when the userbot cannot answer (offline) the list is saved and rows come back "unverified". The running userbot picks the change up within a few minutes, no restart. An empty list means "watch every joined chat" — NOT "watch nothing".
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": {
"groups": "<groups>"
},
"name": "set_watched_groups"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | No | The telegram_mtproto bot. Omit when the application has exactly one userbot. | |
| groups | Yes | The complete replacement list. Empty array = watch every joined chat. | |
| applicationId | No | Application (workspace) id. Optional: an application-scoped key (app_...) defaults to its own application, but a personal key (usr_...) has no default and omitting it fails with MCP_APPLICATION_REQUIRED. Call list_applications to get the id. |