Skip to main content
Glama

Call a webhook when a message arrives

notify_on_message

Wait for a matching chat message and POST its details to a webhook URL. This lets an assistant wake later and read the reply even if Beeper was offline.

Instructions

Durable wait that outlives this conversation: when a message matching chatID (and optionally from) arrives, a background notifier POSTs a short JSON to url: chatID, chat, sender, messageID, time, and the text only if includeText. Use it for long waits (a reply expected tonight or tomorrow) with a webhook that can wake an assistant (a T3 Code webhook task, n8n, Home Assistant…); when woken, read the message with get_new_messages. Nothing is missed while Beeper or the computer is off: the notifier catches up from since when it reconnects. Only https:// URLs, or http:// to localhost. It sends data about the user's chats to that URL: confirm with the user first, naming the URL's site.

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": {
      "chatID": "<chatID>",
      "url": "<url>"
    },
    "name": "notify_on_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesWebhook to POST to: https://, or http:// to localhost
fromNoOnly senders whose name or ID contains this text
onceNoStop after the first matching message (default true); false keeps calling for every message
sinceNoISO time, at most 7 days ago: also act on messages already received after it, e.g. the time of your last message (default: now)
chatIDYesChat to watch (chat ID or local chat ID)
includeTextNoAlso send the message text to the URL (default false: the woken assistant reads it with get_new_messages). Only with once: true

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, destructiveHint=false; the description adds far more — the wait survives this conversation and machine downtime, catches up from `since` on reconnect, restricts URLs to https or localhost-http, and enumerates exactly what data leaves the system. It also flags the consent requirement (confirm with the user, naming the site), which is essential behavioral context for an external-data-egress tool.

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

Conciseness4/5

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

Front-loaded with the core behavior, then constraints, then the privacy warning — a sensible order. Some parentheticals (integration examples, default explanations) make sentences dense, but each carries real decision-relevant information rather than 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?

Covers durability, matching, payload, protocol limits, consent, and the wake-up workflow — thorough for a six-parameter open-world tool with no output schema. The one gap is that it never says what the call returns (e.g. an identifier usable with cancel_notification/list_notifications), which an agent needs to later manage or cancel the notification.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining the outbound payload fields (chatID, chat, sender, messageID, time, text only if includeText) and the catch-up meaning of `since` — semantics not visible in the schema. It does not cover `once` interaction with includeText beyond a hint, and the schema handles that anyway.

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 concrete verb and resource — a durable wait that POSTs a JSON payload to a webhook when a matching message arrives — and names the mechanism (background notifier), the match keys (chatID, optionally from), and the follow-up tool (get_new_messages). An agent can tell this apart from wait_for_message purely from the 'long waits' framing.

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?

Gives explicit when-to-use guidance ('long waits (a reply expected tonight or tomorrow)') plus the post-wake procedure (read with get_new_messages) and named integration targets. It does not explicitly name wait_for_message as the short-wait alternative or state when not to use it, so inference is still required for the boundary case.

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