Skip to main content
Glama

send_push_notification

Broadcast an immediate push notification to all or a tagged segment of an app's subscribers across Web, Android, and iOS. Use for real-time delivery; not for scheduled sends.

Instructions

Broadcast an immediate push notification across Web Push (VAPID), Android (FCM), and iOS (APNs) to active subscribers of a specific app_id. Use this tool for instant real-time delivery; do not use it for future or recurring broadcasts (use schedule_push_notification instead) or in-page popups (use configure_inapp_banner instead). Prerequisite: call list_apps first to obtain app_id. Requires PUSHNOTIF_API_KEY, deducts 1 credit (Rp 0.20) per successfully delivered device (0 credits charged for 404/410 dead tokens, which are auto-pruned), and is irreversible once dispatched. Set segment='all' for all active subscribers or pass a specific tag name to target a subset. Returns JSON { ok, campaign_id, total_targeted, total_delivered, total_gone_pruned, credits_deducted, credits_remaining }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoOptional HTTPS destination URL opened when the user taps the notification (defaults to the app's site_url)
bodyYesNotification message body text (1 to 240 characters)
titleYesNotification headline shown on lock screen (1 to 100 characters)
app_idYesTarget application ID in format app_xxxx (obtain from list_apps)
segmentNoSubscriber filter: 'all' (default, sends to every active subscriber of app_id) or a specific subscriber tag string (e.g., 'vip', 'jakarta')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.1.2
    • changedInput schema / properties / app_id / description
      Previous value: -"App ID tujuan (misal: app_xxxx)"New value: +"Target application ID in format app_xxxx (obtain from list_apps)"
    • changedInput schema / properties / body / description
      Previous value: -"Isi pesan notifikasi"New value: +"Notification message body text (1 to 240 characters)"
    • changedInput schema / properties / segment / description
      Previous value: -"Filter segmen pelanggan (default: all)"New value: +"Subscriber filter: 'all' (default, sends to every active subscriber of app_id) or a specific subscriber tag string (e.g., 'vip', 'jakarta')"
    • changedInput schema / properties / title / description
      Previous value: -"Judul pesan notifikasi"New value: +"Notification headline shown on lock screen (1 to 100 characters)"
    • changedInput schema / properties / url / description
      Previous value: -"URL tujuan saat notifikasi diketuk"New value: +"Optional HTTPS destination URL opened when the user taps the notification (defaults to the app's site_url)"
  2. First observedv2.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare non-read-only, non-idempotent, open-world behavior, but the description adds substantial context beyond them: required PUSHNOTIF_API_KEY, per-device credit cost (Rp 0.20) with 0 credits for auto-pruned 404/410 dead tokens, and irreversibility once dispatched. This is exactly the billing/side-effect detail an agent needs before firing a broadcast.

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?

Dense but front-loaded: the core action and channel list lead, followed by usage exclusions, prerequisites, cost, and return shape. Every sentence carries actionable information and none is padding.

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?

No output schema exists, but the description enumerates the return JSON fields (campaign_id, totals, pruned tokens, credits). Combined with prerequisites, cost, and irreversibility, an agent has everything needed to call this destructive-ish broadcast correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all five parameters including segment, url defaults, and length bounds. The description's restatement of segment='all' vs a tag name adds only marginal value beyond the schema, so the baseline 3 is appropriate.

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 (broadcast), resource (immediate push notification), and the three delivery channels (Web Push/VAPID, FCM, APNs) scoped to a specific app_id. It explicitly distinguishes itself from schedule_push_notification and configure_inapp_banner, so an agent can route correctly without opening other schemas.

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?

Gives explicit when-to-use ('instant real-time delivery'), two when-not-to-use cases with the exact alternative tool named for each, and a prerequisite ('call list_apps first to obtain app_id'). Nothing is left to inference.

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