Skip to main content
Glama

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

NameRequiredDescriptionDefault
idYesFull hierarchical issue id to monitor, e.g. "sk-42" or "sk-42.1".
clientNoName 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.
subtreeNoWhen 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).
platformNo"posix" (default) or "windows"; only with client.
tokenDirNoRequired with platform="windows": an absolute private directory of yours with a drive letter, e.g. %LOCALAPPDATA%.
eventTypesNoNotification 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"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / client
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • addedInput schema / properties / platform
      Added value: +{
      +  "description": "\"posix\" (default) or \"windows\"; only with client.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tokenDir
      Added value: +{
      +  "description": "Required with platform=\"windows\": an absolute private directory of yours with a drive letter, e.g. %LOCALAPPDATA%.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds what the annotations convey (readOnlyHint=false, destructiveHint=false only say it mutates safely). The description discloses token scope and lifetime (lapses after 6h idle, hard 12h cap, server-configurable), retry-until-closed runner behavior, subtree watch permanence, and an explicit security warning about argv/history leakage — all material behavior an agent could not infer otherwise.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The substance is front-loaded in the first sentence and the security callout is a distinct block, so scanning works. However, several sentences are dense run-ons with stacked parentheticals (the token-lifetime sentence in particular), which costs readability without much redundancy to cut.

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?

There is no output schema, and the definition compensates fully by naming the returned fields (`monitorId`, `token`, `usage`/command) and the `token`-field-versus-command distinction. For a mutating, multi-step, token-minting tool this covers everything an agent needs to invoke it safely.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds value by explaining the `client` fallback (unknown id yields the general record and a warning listing valid ids) and by tying `preflight`/`bootstrap` selection to whether `client` was supplied. `platform` and `tokenDir` are only implied ('preflight picks how the runner reaches you') rather than explained, keeping it below 5.

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?

Opens with a specific verb and resource: 'Set up a live notification monitor on an issue for a headless agent,' then enumerates the three concrete effects (watch subscription, scoped token minting, returned monitorId + runner command). An agent can distinguish this from skein_notifications without opening the schema, because the definition makes clear this one-call setup persists a monitor rather than reading existing notifications.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context — use it for headless agents, pass `client` when not Claude Code, omit it for Claude Code — and spells out the required `prepare` → write token → start sequence. It stops short of explicitly naming when to prefer a sibling (e.g. skein_notifications) over establishing a monitor, so no true alternatives/exclusions section.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.