add_alert_rule
Create a pattern-based alert rule that watches incoming Telegram messages and fires notifications when matches occur, filtered by chat or match type.
Instructions
Create an alert rule. The watcher picks it up within a few seconds — no restart needed. Rules only match messages that arrive after they are created; use search_messages to look backwards.
Args: name: unique label for the rule, used in alerts and notifications. pattern: what to look for. match_type: 'substring' (default), 'word' (whole-word only), or 'regex'. case_sensitive: match case exactly (default: case-insensitive). chat_ids: only watch these chats; omit to watch every chat. exclude_chat_ids: never match in these chats; applied before chat_ids. include_outgoing: also match messages you send (default: incoming only). notify: fire a macOS desktop notification on match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| notify | No | ||
| pattern | Yes | ||
| chat_ids | No | ||
| match_type | No | substring | |
| case_sensitive | No | ||
| exclude_chat_ids | No | ||
| include_outgoing | No |