skein_get_monitor_script
Set up a live notification monitor on an issue for a headless agent. One call: (1) subscribes you as a watcher of the issue (subtree=true also covers every current and future subtask); (2) mints a scoped, read-only skm_ monitor token (it can only poll) tied to your calling API key — it stays valid while the runner keeps polling, lapses after 6h without a successful check (the renewal window, configurable on the server) and never lives past 12h after minting; (3) returns monitorId (the handle to stop this monitor) and the command that starts an autonomous Python runner: bootstrap without client, preflight with it (preflight picks how the runner reaches you). It delivers new notifications (new comments AND task closure by default) near-real-time. The runner keeps retrying through server or network trouble and stops by itself when the issue is closed.
SECURITY: the token is returned in the token field, NOT in a command. Run prepare, write token to tokenFilePath with the Write tool, then start the monitor as usage says — the runner reads the token from that file. Do NOT paste the token into a shell command (it would leak into argv / shell history).
If you are not Claude Code, call with client: the id of your agent, e.g. claude, codex, grok, kimi, gemini, opencode, qwen-code, cursor, copilot, hermes; an unknown id gets the general record, and the response warns with the full list of ids.
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": {
"id": "<id>"
},
"name": "skein_get_monitor_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Full hierarchical issue id to monitor, e.g. "sk-42" or "sk-42.1". | |
| client | No | Name of your agent (a-z, 0-9, "-", up to 64). With it the response carries the monitor setup of that agent; omit it for Claude Code. | |
| subtree | No | When true, monitor this issue AND its subtree by the hierarchy: every issue that has it as a parent, grandparent, … at the moment of each poll (parentIdCurrent chain — not an id prefix). Future subtasks are covered automatically; an issue moved under another parent stops being reported from then on, one moved in starts. Only events of this issue's project are delivered. Also upgrades the auto-watch to subtree scope (subtree dominates — a later subtree=false never downgrades it). Default: false (this issue only). | |
| platform | No | "posix" (default) or "windows"; only with client. | |
| tokenDir | No | Required with platform="windows": an absolute private directory of yours with a drive letter, e.g. %LOCALAPPDATA%. | |
| eventTypes | No | Notification types to deliver. Each must be "comment.created" or start with "issue." (the only types the poll endpoint can normalise in v1) — anything else (e.g. "attachment.added") is rejected with validation_error. Empty / omitted defaults to ["comment.created","issue.closed"]. |