Send a notification - ToolGate tool package

examples.notify

Tools: notify.send. Part of the Java Tool SDK examples.

By ToolGate Examples Signed

Java 17, protocol 2

Download

Use in ToolGate

In the ToolGate console, open Server packages, then Marketplace, and install this package. These values identify exactly what you install:

{
    "marketplace": "olo-labs-marketplace",
    "packageId": "examples.notify",
    "version": "0.1.0",
    "packageDigest": "sha256:fd90dd892456acd3dd558b55192fda9b8f1c32947653ddcc5809956925826ced"
}

Overview

Webhook notify

Tools: notify.send. Part of the Java Tool SDK examples.

Posts a notification (title, text, severity, source, reference) as JSON to /hooks/<channel> on the webhook the administrator approved: an internal alert relay, n8n, an incident tool or a chat bridge. Change the route path in the source to match your receiver.

Safety

  • The API key is route auth (X-Api-Key from the WebhookApiKey secret). Under ToolGate the broker adds it, so the code never sees it.
  • The tool is NON_IDEMPOTENT with a business key: reference. A repeat with the same reference returns the first result instead of sending twice, and the reference goes upstream as Idempotency-Key so the receiver can deduplicate as well.
  • Only channels in AllowedChannels can be posted to. Messages are capped at 16 KiB.

Settings

Globals unless marked. Set them in toolgate.dev.json for development, as TOOLGATE_GLOBAL_<NAME> (or TOOLGATE_DESTINATION_<NAME>, TOOLGATE_SECRET_<NAME>) for a standalone jar, or on the deployment under ToolGate.

Setting Default Meaning
WebhookHost (destination) none Host of the webhook receiver.
WebhookApiKey (secret) none API key sent as X-Api-Key.
AllowedChannels ops-alerts Comma-separated channels callers may post to.
Source toolgate Sender name included in every message.

Try it

cp toolgate.dev.example.json toolgate.dev.json   # then edit it; never commit toolgate.dev.json
toolgate dev                                      # an MCP server over stdio
toolgate pack                                     # build/toolgate/webhook-notify-0.1.0.tgpkg

Things to ask a model connected to it:

  • "Alert ops-alerts that /var on app-1 is 93% full; reference disk-app-1-2026-10-12."

Tools

notify.send Non idempotent
Send a notification Posts a notification (title, text, severity) to an allowlisted webhook channel. Sending again with the same reference returns the first result instead of sending twice.

Settings it needs

NameKindTypeDefaultDescription
WebhookHostdestinationHost of destination webhook
WebhookApiKeysecretSTRING
AllowedChannelsglobalSTRINGops-alertsComma-separated channels callers may post to.
SourceglobalSTRINGtoolgateSender name included in every message, such as the environment or team.

Versions

VersionAPI changeCompatibilityPublished
0.1.0 none Java 17, protocol 2 15 Oct 2026 - 11:55

Publisher

ToolGate Examples, OLO Labs

Publisher details are supplied by the publisher. Validation checks package format, not code safety.