Skip to main content
Glama

aiworkhub_supervisor_loop_status

Read-only

Derive a task's supervisor state and error class from queue checks for runner/topic mismatch, missing artifacts, collisions, stale tasks, and validation failure—without mutating queue/audit state.

Instructions

READ-ONLY: derive supervisor_state + error taxonomy for a task_id.

Use this for the derived supervisor state and error class of one task; use aiworkhub_agent_task_status for the raw launched request and its card.

Implements the B08 contract's 7-step derivation over the LIVE queue (task_mcp_supervisor_loop_status_tool_b08_v1.json): fetch_status via core.show_task, then runner_topic_mismatch / missing_artifact / collision / stale_task / failed_validation checks, falling through to a read-only lifecycle_state -> supervisor_state mapping when none trip.

FROZEN READ-ONLY CONTRACT -- no write-gate toggle, no mutation parameters. Never calls taskctl done/review/start/auto-pickup/add-card. Never mutates queue or audit state. Never launches agents or processes. Writes remain default-off regardless of input values.

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": {
      "task_id": "<task_id>"
    },
    "name": "aiworkhub_supervisor_loop_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicNoTopic to check against the runner/topic allowlist for review; omit both runner and topic to skip the check.
runnerNoRunner to check against the runner/topic allowlist for review; the check runs when runner or topic is given, and a mismatch blocks the reply.
task_idYesId of the task card to derive the supervisor state for; an unknown id returns state not_found.
previous_snapshotNoEarlier card snapshot as {status, worker_status}; if the live card differs the reply is blocked as stale_task. Omit to skip the check.
supervisor_request_idNoCaller correlation id echoed back in the reply; omit if you have none.
reported_validation_verdictNoValidation verdict you observed elsewhere; only failed matters and blocks the reply as failed_validation. This tool never runs validation.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.12.67
    • addedInput schema / properties / previous_snapshot / description
      Added value: +"Earlier card snapshot as {status, worker_status}; if the live card differs the reply is blocked as stale_task. Omit to skip the check."
    • addedInput schema / properties / reported_validation_verdict / description
      Added value: +"Validation verdict you observed elsewhere; only failed matters and blocks the reply as failed_validation. This tool never runs validation."
    • addedInput schema / properties / runner / description
      Added value: +"Runner to check against the runner/topic allowlist for review; the check runs when runner or topic is given, and a mismatch blocks the reply."
    • addedInput schema / properties / supervisor_request_id / description
      Added value: +"Caller correlation id echoed back in the reply; omit if you have none."
    • addedInput schema / properties / task_id / description
      Added value: +"Id of the task card to derive the supervisor state for; an unknown id returns state not_found."
    • addedInput schema / properties / topic / description
      Added value: +"Topic to check against the runner/topic allowlist for review; omit both runner and topic to skip the check."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond readOnlyHint=true: it enumerates the 7-step derivation order (runner_topic_mismatch, missing_artifact, collision, stale_task, failed_validation, then lifecycle mapping) and names the contract artifact it implements. It also states exactly what will never happen — no taskctl done/review/start calls, no queue or audit mutation, no agent launch, writes default-off regardless of input — closing the 'is this safe?' question for a mutation-adjacent name.

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?

Front-loads the READ-ONLY marker and the sibling disambiguation before the derivation detail, which is the right order. Slight redundancy in the closing block, where read-only is restated three times ('FROZEN READ-ONLY CONTRACT', 'Never mutates', 'Writes remain default-off'), costs a point but the repetition is defensible for a safety-critical claim.

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?

An output schema exists, so return values need no prose, and the description instead spends its space on the derivation pipeline and the read-only guarantees. For a 6-parameter, single-required-arg read tool with full schema coverage, nothing an agent needs in order to call it correctly is missing.

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 per-parameter descriptions already carry the baseline. The description adds real value on top by explaining that runner/topic, previous_snapshot, and reported_validation_verdict feed into ordered blocking checks and that falling through to the lifecycle mapping is the non-error path, which the schema fields alone do not convey.

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 specific verb and output ('derive supervisor_state + error taxonomy for a task_id') and immediately contrasts it with the sibling that returns raw data ('aiworkhub_agent_task_status for the raw launched request and its card'). An agent can select between the two without opening either schema.

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 an explicit use case and names the alternative tool and the condition that favors it. The gap is the near-identically named sibling aiworkhub_manager_loop_status, which is never mentioned or disambiguated despite being the most likely confusion point in a long tool list.

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

Deploy Server

Other Tools