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 a ready-to-run bootstrap command that streams new notifications (new comments AND task closure by default) into your context near-real-time via an autonomous Python runner. 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 the bootstrap command. Write token to the 0600 file named by tokenFilePath (use the Write tool) and run bootstrap as-is — the runner reads the token from that file. Do NOT paste the token into a shell command (it would leak into argv / shell history).
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". | |
| 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). | |
| 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"]. |