Skip to main content
Glama

save_token_poll

Check, wait for, or terminate background jobs started via tools.spawnBg, with optional log compaction and intent-based filtering for large outputs.

Instructions

Check, wait for, or kill background jobs started via tools.spawnBg(cmd) with optional RTK compaction (compact) and FTS5 intent filtering.

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": {
      "jobId": "<jobId>"
    },
    "name": "save_token_poll"
  }
}

Input Schema

NameRequiredDescriptionDefault
killNoTerminate the running background process tree.
jobIdYesJob ID returned by `tools.spawnBg`.
intentNoOptional BM25 intent filter for large outputs.
waitMsNoWait up to N ms (0..30000) for completion.
compactNoApply RTK-style log compaction to output.
maxOutputCharsNoOutput character cap (500..32000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It hints at compaction and intent filtering behavior, but discloses nothing about whether kill is irreversible, what state the job is left in after a non-terminal poll, whether output is consumed on read, or how the jobId behaves once a job finishes.

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?

A single front-loaded sentence with no filler, naming the verbs first and the modifiers second. The inline backticked parameter callouts (`compact`, `intent`) are slightly cryptic but compact rather than wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a six-parameter tool with no annotations and no output schema, so the description should explain what a poll returns (status, output, exit code) and how compaction/intent filtering change that. It instead omits all return-value and lifecycle information, leaving the agent to discover it empirically.

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

Parameters3/5

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

Schema description coverage is 100%, so all six parameters are already documented, including the valid ranges for waitMs and maxOutputChars. The description's mention of RTK compaction and FTS5 intent filtering largely restates what the schema already says, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States three concrete verbs (check, wait for, kill) against a specific resource (background jobs) and anchors it to the creating tool via `tools.spawnBg(cmd)`, so an agent knows exactly what domain this operates on. It doesn't explicitly contrast itself with the save_token_* siblings, which keeps it out of 5 territory.

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

Usage Guidelines3/5

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

The phrase 'Check, wait for, or kill' enumerates the three modes of use, which implies the decision space, but it never states which mode to pick under which condition (e.g., use waitMs>0 vs. repeated polling, or when kill is appropriate). No exclusions or prerequisites beyond the spawnBg reference are given.

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