Skip to main content
Glama

Job state

queue_job
Read-only

Check a queued job's status, exit code, outcome, and recent output using its job ID to monitor runs and diagnose failures.

Instructions

The state of a job started with queue_run: starting, waiting, running, finished or lost (its runner ended without a result). For a finished job: the exit code and the outcome from the queue journal (ran, skipped, refused, timed-out, gave-up, left, stopped, could-not-start). Also the last lines of its output.

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": "queue_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesThe job id queue_run returned.
tailLinesNoHow many lines of output to return, from the end. Default: 40.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered; the description goes further by defining each terminal and non-terminal state, including what 'lost' means ('its runner ended without a result'), and by disclosing that a finished job yields an exit code plus a journal outcome drawn from a fixed vocabulary. That is meaningful behavioral context an agent cannot get from the annotations. It does not describe failure modes such as an unknown or expired job id.

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?

Two dense sentences that front-load the resource and then qualify the finished-job case. The long parenthetical outcome list is verbose but earns its place by letting the agent interpret results without another call. No filler or repeated framing.

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

Completeness4/5

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

With no output schema, the description must carry the return-value burden, and it does: state vocabulary, exit code, outcome vocabulary, and output tail are all named. Remaining gaps — behavior for an invalid job id and the relationship to queue_status/queue_history — are modest but real for a two-parameter read tool.

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 coverage is 100%, so both parameters are already fully documented, which sets the baseline at 3. The phrase 'the last lines of its output' reinforces what tailLines controls, but no additional syntax, defaults, or interaction between tailLines and job state is added beyond the schema.

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?

The description states a specific resource — the state of a job created by queue_run — and enumerates exactly what is reported (state, exit code, journal outcome, output tail). It ties back to its producer tool queue_run, so the agent knows where the jobId comes from. It does not address how it differs from the similarly named sibling queue_status, leaving one potential overlap unresolved.

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?

Usage is implied rather than stated: the job id is 'returned by queue_run', and the enumerated states make it clear this is the tool for checking progress and retrieving a finished job's result. There is no explicit when-to-use/when-not guidance, no statement about polling versus waiting, and no routing away from queue_status or queue_history for overlapping questions.

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