Set Live Activity Stream
set_live_activity_streamCreate or update a managed Live Activity stream by stable stream_key.
REMOTE DELIVERY BUDGET: Each non-noop operation can send a remote ActivityKit push. iOS applies device-dependent push-to-start and update budgets and may throttle delivery even after APNs accepts the request. Use one stable stream_key for each real-world activity and send updates when its user-visible state meaningfully changes. Event-driven transitions may be seconds apart—for example, successive steps in a short deployment—and should be sent promptly; do not delay them to satisfy a fixed minimum interval. Short bursts of genuine progress are expected. Avoid sustained polling, heartbeat updates, per-second timer ticks, unchanged values, and high-frequency churn that does not communicate a meaningful transition. Coalesce only redundant or excessively granular changes. Do not retry a successful call to force display: success means APNs accepted the push, not that the device displayed it.
First call starts the Live Activity. Later calls with the same stream_key, same content_state.type, and same target channels update it. Repeating the same payload returns operation "noop". Changing the type or target channels rotates to a new underlying Live Activity.
Keep content_state.type and target channels stable to avoid consuming another push-to-start operation. For countdowns, send timer fields once and let the device render elapsed time locally instead of sending frequent updates.
Supported content_state.type values: segmented_progress, progress, metrics, stats, alert, timer, value.
Icons work with stats, metrics, progress, segmented_progress, alert, timer, and value. Use Apple SF Symbol names for icons. Badges work with alert, progress, segmented_progress, and value. A top-level action adds the Live Activity tap/action button and can open an HTTP/HTTPS URL, run an iPhone Shortcut with shortcuts://run-shortcut?name=..., open an installed app through its custom URL scheme such as spotify://, or trigger a backend webhook. Set dismiss_after_action: true on an open_url button to end the Live Activity after the tap. A top-level secondary_action adds a second button for alert, progress, segmented_progress, and value Live Activities.
Examples: { "value": { "title": "Current revenue", "subtitle": "Today", "type": "value", "value": "$1,240", "color": "cyan", "icon": "dollarsign.circle", "badge": { "title": "Live", "color": "green" } }, "segmented_progress": { "title": "Deploying API", "subtitle": "Step 2 of 4", "type": "segmented_progress", "current_step": 2, "number_of_steps": 4 }, "progress": { "title": "Uploading build", "subtitle": "42% complete", "type": "progress", "percentage": 42 }, "metrics": { "title": "Server load", "subtitle": "Current usage", "type": "metrics", "metrics": [ { "label": "CPU", "value": 27, "unit": "%" } ] }, "stats": { "title": "Sales", "subtitle": "Last 15 minutes", "type": "stats", "metrics": [ { "label": "Revenue", "value": 12.8, "unit": "k" }, { "label": "Orders", "value": 37 }, { "label": "Avg Order", "value": "$346" } ] }, "alert": { "title": "Alert", "message": "Incident response started. Primary API is degraded across regions.", "type": "alert", "color": "magenta", "icon": { "symbol": "exclamationmark.circle", "color": "yellow" }, "badge": { "title": "Escalated", "color": "gray" } }, "timer": { "title": "Benchmark Run", "subtitle": "sampling performance", "type": "timer", "duration_seconds": 300, "color": "cyan", "counts_down": true } }
Action examples: { "open_url": { "title": "Open Runbook", "type": "open_url", "url": "https://example.com/runbook" }, "shortcut": { "title": "Chat with Jarvis", "type": "open_url", "url": "shortcuts://run-shortcut?name=Jarvis" }, "app_url_then_end": { "title": "Open Spotify", "type": "open_url", "url": "spotify://", "dismiss_after_action": true }, "webhook": { "title": "Acknowledge", "type": "webhook", "url": "https://example.com/hooks/ack", "method": "POST", "body": { "incident_id": "inc_123" } } }
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": {
"stream_key": "<stream_key>",
"content_state": "<content_state>"
},
"name": "set_live_activity_stream"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Optional account tags used to organize Live Activity history. | |
| alert | No | Optional APNs alert payload shown when the Live Activity starts or updates. | |
| sound | No | Optional sound for this call. Starts play the sound picked on the device unless you set one. Updates and ends are silent unless you set one, and iOS plays their sound only while the screen is on. Use one of the sounds bundled with the ActivitySmith app (arrive, bell, bells, bitflip, bloom, callout, chime, coin, corrupt, crest, cue, ding, drop, ember, emblem, flourish, glimmer, glint, glitch, lantern, nightfall, nudge, pixel, pop, signal, streak, tally, wand, whoosh, zip), default for the sound picked on the device, or none for silence. Use it for moments that need attention, such as a failed step. | |
| action | No | Optional action button/tap target. Use { title, type: "open_url", url } with an HTTP/HTTPS URL, shortcuts://run-shortcut?name=... to run an iPhone Shortcut, or an installed app's custom URL scheme, such as spotify://. Custom app schemes require the target app to be installed; no web fallback is provided. Unsafe schemes and ActivitySmith's internal scheme are blocked. Add dismiss_after_action: true to an open_url button to end the Live Activity after the tap. Use { title, type: "webhook", url, method, body } to call an HTTPS webhook. Webhook method can be GET or POST. | |
| metadata | No | Optional app-only details with string, number, or boolean values. Omit to preserve; send {} to clear. Never sent to ActivityKit. | |
| stream_key | Yes | Stable Live Activity stream key. Use the same key to update the same stream. Do not create new keys for routine updates: every new stream requires another remote start and uses the device's limited iOS push-to-start budget. Use only letters, numbers, underscores, and hyphens. | |
| content_state | Yes | Live Activity content state. Set type to one of: segmented_progress, progress, metrics, stats, alert, timer, value. Use segmented_progress for step-based work, progress for continuous completion, metrics or stats for multiple values, value for one prominent string or number, alert for important status, and timer for countdown or elapsed time. Icons work with all types: use icon as an SF Symbol string or { symbol, color }, plus optional icon_color and icon_style. Badges work with alert, progress, segmented_progress, and value: use badge { title, color }. Timers take duration_seconds, or ISO 8601 timer_start_at and timer_end_at; timer_start_at can be in the past for a timer that started earlier. Other optional presentation fields include subtitle, color, auto_dismiss_seconds, and auto_dismiss_minutes. | |
| secondary_action | No | Optional secondary action button for alert, progress, segmented_progress, and value Live Activities. Uses the same object shape as action. | |
| target_channel_slugs | No | Optional channel slugs to target. Omit to target the account-wide default delivery scope. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||