Skip to main content
Glama

job_restatus

Corrects a finished job's terminal status and records the mandatory reason as a milestone timeline event. Use when a terminal job was mis-recorded; target status must differ from current.

Instructions

Correct a FINISHED job's terminal status (terminal -> terminal), for a mis-recorded close-out — e.g. a run that finished 'passed' but never got a verdict. reason is mandatory and lands as a milestone timeline event. The job must already be terminal (a queued/running job finishes or is cancelled) and the target must differ from the current status, else the call is a conflict.

Input Schema

NameRequiredDescriptionDefault
job_idYesJob id from job_enqueue/job_list, e.g. 'j-1a2b3c4d'
reasonYesWhy the ledger is being corrected (recorded on the timeline)
statusYespassed | failed | error | cancelled | inconclusive

Output Schema

NameRequiredDescriptionDefault
idYes
kindYes
linksNo
phaseNo
titleYes
eventsNo
originNoWho asked for this run (human | agent | driver | eval | probe | warmup) — scopes the learning loopagent
paramsNoIntake: purpose, expected, caps, flags, pending_shot, ...
statusYes
targetYes
workerNo
host_idNoNULL = not yet assigned (host_choice='ask')
summaryNoPresent once the job is closed out
web_urlNoAbsolute URL of this job's page in the web UI
positionNo
artifactsNo
created_atYes
project_idNo
started_atNo
updated_atYes
crash_countNocrash-level events (the queue board flags these)
error_countNoerror-level events (the queue board flags these)
finished_atNo
current_stepNoThe step awaiting a verdict (newest prompt event + whether it is answered)
requested_byNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, idempotent=false, destructive=false) by disclosing the write's side effect (the mandatory `reason` is written as a `milestone` timeline event) and the failure mode (invalid preconditions produce a conflict). This tells an agent exactly what mutation it is committing and why a call would be rejected.

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

Conciseness5/5

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

Two sentences, zero filler, with the core action and its terminal->terminal scope front-loaded before the example. Every clause carries information the agent needs: use case, side effect, precondition, and error behavior.

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?

For a 3-parameter mutation with annotations and an output schema, the description covers everything an agent must know before calling: preconditions, side effects, conflict behavior, and the correction intent. Return values are left to the output schema, as appropriate.

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, but the description earns more: it makes `reason` semantically meaningful (it becomes a milestone timeline event) and constrains `status` with the must-differ-from-current rule, which the schema does not state. It does not enumerate the accepted status values itself, relying on the schema for that.

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?

States a precise verb and resource: correcting a FINISHED job's terminal status, with the 'terminal -> terminal' scope made explicit. It is clearly distinguished from job_finish and job_cancel, which handle queued/running jobs, and the example ('finished passed but never got a verdict') pins down the exact use case.

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 when-to-use ('mis-recorded close-out') and when-not ('a queued/running job finishes or is cancelled'), plus two hard preconditions: the job must already be terminal and the target status must differ from the current one. It routes by condition rather than by naming job_finish/job_cancel directly, so the alternative is implied rather than explicitly named.

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