Skip to main content
Glama

Ray notifications

Send notification

send_notification

Send a notification (POST /send; needs a write-scoped key). Returns { sendId } with HTTP 202: delivery is asynchronous, so check the outcome with get_send_status. Use exactly one mode:

  1. Single: channelConfigId + recipient.

  2. Fan-out: channelConfigId + targets (1-1000 { recipient, externalUserId? }), one channel, one sendId.

  3. Multi-channel: deliveries (1-10, each with its own channelConfigId, recipient and templateId or content) for ONE person over several channels; add feed + externalUserId for a single in-app feed entry.

  4. Feed-only: feed (with title) + externalUserId and no channel: an in-app notification only. In modes 1-2 give exactly one of templateId (a published template, plus params) or inline content; in mode 3 that choice is made per delivery. Get channel ids and each recipient shape from list_channels first. Pass idempotencyKey whenever a retry must not deliver twice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedNoCreate exactly ONE in-app feed entry for `externalUserId` (read back with list_feed_notifications). `title`/`description` default to the rendered template text; `title` is required for a feed-only send (mode 4).
paramsNoValues for the template's `{{placeholders}}`. Any JSON: strings, numbers, booleans, arrays and nested objects (arrays/objects drive `{{#section}}…{{/section}}` blocks). Missing required params are rejected with a 400 naming them.
contentNoInline message content, used INSTEAD of `templateId` (give exactly one of the two). Shape by channel kind: ses_email / smtp_email → `{ subject, bodyHtml, bodyText }`; fcm_push → `{ title, body, imageUrl?, data?: { [key]: string } }`; slack_webhook → `{ text }` (Slack mrkdwn); discord_webhook → `{ content }` (max 2000 chars); telegram_bot → `{ text, disableLinkPreview? }` (Telegram HTML subset); generic_webhook → `{ title, body, data?: { [key]: string } }`. `{{name}}` placeholders are filled from `params` and escaped for the channel.
targetsNoMode 2: fan-out to 1-1000 recipients over ONE channel, sharing one sendId. Mutually exclusive with `recipient`.
logTitleNoFeed/log title for inline `content` sends only (template sends take it from the template). Placeholders allowed.
priorityNo"high" (default) for transactional messages; "low" for marketing/bulk so it never delays transactional sends.
notBeforeNoSchedule delivery for later: ISO 8601 datetime with offset, e.g. "2026-09-15T09:00:00+08:00". Omit to send now.
recipientNoMode 1: the single recipient. Mutually exclusive with `targets`. Channel-specific delivery target. Its shape depends on the kind of the chosen channel (list_channels returns each channel's exact `recipientSchema`): ses_email / smtp_email → `{ email, name?, cc?: [{ email, name? }], bcc?: [...], attachments?: [{ filename, content (base64), contentType?, disposition?: "attachment"|"inline", contentId? }] }`; fcm_push → `{ deviceToken }` OR `{ topic }` (exactly one; Ray keeps no device registry); telegram_bot → `{ chatId }` (numeric id as a string, or "@channelname"); slack_webhook, discord_webhook, generic_webhook → `{}` (the destination is part of the channel config).
campaignIdNoFree-form campaign id used to group click stats across sends.
deliveriesNoMode 3: the same notification to ONE person over several channels (e.g. push + email), max 10. Each entry has its own channel, recipient and content source. Do not combine with top-level channelConfigId/recipient/targets/templateId/content.
showInFeedNoLegacy modes 1-2 flag: also add a feed entry for each target that has an externalUserId. Prefer `feed`. Not valid with `deliveries`.
templateIdNoModes 1-2: a PUBLISHED template to render (see list_templates / publish_template). Exactly one of `templateId` or `content`. Its channelKind must match the channel's `templateKind`.
trackClicksNoEmail channels only: rewrite links in bodyHtml so clicks are counted (read with get_click_stats). Default false.
externalUserIdNoYour own id for the end user. Required with `feed`; keys their in-app feed.
idempotencyKeyNoSent as the Idempotency-Key header. Retrying with the same key and same arguments returns the original sendId without sending again (24h window); the same key with different arguments fails with 409. Use a fresh unique value (e.g. a UUID) per logical notification.
logDescriptionNoFeed/log description for inline `content` sends only. Placeholders allowed.
channelConfigIdNoModes 1-2: the channel to send through — an `id` from list_channels. Not allowed together with `deliveries`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the HTTP 202 async delivery semantics, the required write-scoped key, the returned sendId, side effects like in-app feed entries, and idempotency behavior via idempotencyKey. These are exactly the behavioral facts an agent needs and they are not recoverable from the annotations alone.

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?

The description is long, but the tool is genuinely complex. It is front-loaded with the endpoint, auth, response, and async behavior, then compactly enumerates the four modes. Each sentence carries decision-relevant information; there is no filler or repetition of generic tool boilerplate.

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

Completeness5/5

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

Despite having no output schema, the description covers the return contract ('Returns { sendId } with HTTP 202') and directs the agent to get_send_status for the outcome. It also covers prerequisites, per-channel recipient shapes, template vs inline content, mode-specific exclusions, and idempotency guidance. Nothing critical is missing for a tool of this complexity.

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 extra by organizing the 17 parameters into a mode-based decision tree, clarifying mutual exclusions such as 'exactly one of templateId or content', and explaining per-delivery vs top-level parameter usage in mode 3. The schema also documents these, but the description adds orchestration-level meaning.

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?

The description states a specific action and resource: 'Send a notification (POST /send; needs a write-scoped key).' It also distinguishes the tool from related siblings by naming get_send_status for checking the async result and list_channels for resolving channel ids, and it defines four mutually exclusive send modes so an agent can tell what this tool is for.

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

Usage Guidelines5/5

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

It explicitly says when to use each mode ('Use exactly one mode: 1. Single… 2. Fan-out… 3. Multi-channel… 4. Feed-only'), gives the condition for template vs inline content, and names the prerequisite tool list_channels and the follow-up tool get_send_status. This is explicit, actionable guidance rather than implied usage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.