Skip to main content
Glama
alamri-intel

Telegram OSINT

by alamri-intel

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

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
notifyNo
patternYes
chat_idsNo
match_typeNosubstring
case_sensitiveNo
exclude_chat_idsNo
include_outgoingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses pickup latency ('within a few seconds — no restart needed') and the critical temporal constraint that rules only match future messages. It still leaves permissions/auth requirements and behavior on duplicate names unstated, so it stops short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose and the two highest-value behavioral facts (instant pickup, forward-only matching) before the structured Args list. Every sentence earns its place with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description covers behavior, timing, alternatives, and every parameter. It does not state what the call returns (e.g., a rule id) or any auth prerequisite, which keeps it just under complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the Args section documents all 8 parameters with meaningful semantics: match_type options, case-sensitivity default, chat-scoping behavior, exclude-before-include ordering, and include_outgoing default. This fully compensates for the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Create an alert rule') that is immediately distinguishable from siblings like list_alert_rules, delete_alert_rule, and set_alert_rule_enabled. The follow-on behavioral sentence clarifies it further, leaving no ambiguity about the operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent to search_messages for backwards lookups, which is the key alternative-use case, and frames the rule's forward-only scope. However, it omits the sibling preview_rule, which an agent would plausibly want before committing a pattern, so guidance is clear but not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.