tg_rules
Update Telegram alert rules and automations by merging a patch into current settings: configure alerts, digests, and inbox filters.
Instructions
Update alert rules. Keys: enabled, alert_on_private, alert_on_mention, keywords (list), watch_chats (list), mute_chats (list), ignore_bots, min_interval_sec, quiet_hours ([start_hour, end_hour] or null).
Two more keys drive automation the daemon runs on its own, with no Claude session involved: digest_at (["09:00", "20:00"] local time — a summary of the period into the owner's bot) and auto (inbox filters: a condition — chat, from, keyword, type — plus a safe reversible action out of read, archive, mute, folder, save). Filter actions never write to another person: save forwards to Saved Messages and nothing else can send anything at all. A rule that fires suppresses the alert for that message unless it sets alert: true. Full description of both sections is in docs/configuration.md.
Call tg_status first to see current values; this merges on top of them.
The confirm_* keys (write confirmation mode and its chat whitelist) are the owner's restriction on you, not a setting of yours: they are rejected here and are edited by hand in data/rules.json only.
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": {
"patch": "<patch>"
},
"name": "tg_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes |