alerts.set
LiveOne-shot subscription with an explicit fire time.
Description
Auto-cleaned after firing. Per ADR-0021 §subscriptions.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
target | { kind: 'commitment' | 'rule'; id: string } | yes | What the alert targets. |
trigger_at | string (ISO-8601) | yes | When the alert should fire. |
Output shape
typescript
{ alert_id: string }Example call
JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):
jsontools/call params
{ "name": "alerts.set", "arguments": { "target": { "kind": "commitment", "id": "cmt_01H..." }, "trigger_at": "2026-06-13T15:00:00Z" } }Example response
Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):
jsonparsed result body
{ "alert_id": "alr_01H..." }Errors this tool can return
| Code | Meaning |
|---|---|
invalid_arguments | Tool input failed Zod validation. |
unauthorized | Missing or invalid bearer token. |
quota_exceeded | Per-minute, daily call, or daily inference budget exceeded. |
See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).