Skip to main content
Glama

aiworkhub_task_amend_pending

Amend a pending, never-launched card to fix its validation, scope, objective or required outputs instead of archiving and re-creating it, with refusals for any card already launched or claimed.

Instructions

MANAGER WRITE: amend a pending card that no request was ever launched for.

Use this to widen a card's scope or fix its validation before its first launch, instead of archiving and re-creating it. allowed_writes and read_first are ADD-ONLY (deduplicated; the existing entries stay); validation REPLACES the whole list, with validation_roles aligned one-to-one (omitted roles default to generic, which a bugfix/refactor/... card's work_kind role gate refuses exactly as aiworkhub_task_create does). Paths and commands obey the same rules as aiworkhub_task_create and aiworkhub_task_reject_review's amendments, with the same refusal codes.

Only a never-launched pending card qualifies: a launched, claimed, archived or non-pending card is refused with task_amend_pending_refused:<card_already_launched|card_claimed| card_archived|card_not_pending:<state>|task_not_found>. The amendment is recorded as a card_amended_pending event in the card history (the card stays launchable) and the reply carries the new card_sha256.

cancel_live_launch=true (NF-2026-02311) is the manager path for a claimed/processing auto-rework that cannot pass without the amendment: a card refused card_claimed, card_already_launched or card_not_pending:processing has its launch_request_id cancelled first (reason manager_cancel_for_amend). Only a terminal cancel state proceeds, else task_amend_pending_refused:cancel_not_terminal:<state> with the card unchanged; the card then returns to pending/unclaimed with cancelled_launch recorded, the amendment runs in the same call and the reply carries cancelled_request_id. An archived card stays refused.

objective / required_outputs (NF-2026-01022) fix a typo in the contract itself without archive + re-create under a new id: both REPLACE the card's value, the card id and NF links stay unchanged, and the change is recorded in the card history. They are accepted ONLY on a pending card that was never launched (no launch_request_id, started_at, reject/ supersede/cancel record or request-bearing history entry); any launch history refuses with task_amend_pending_refused:amend_contract_after_launch. Every required_outputs entry must be an exact entry of the card's allowed_writes (including this call's additions), else task_amend_pending_refused:required_output_outside_allowed_writes:<path>.

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_task_amend_pending"
  }
}

Input Schema

NameRequiredDescriptionDefault
runnerNoReplacement runner (folded like task_create); refused as runner_reserved:<r> for the manager identity or runner_route_absent:<r> without a workforce route. Reply carries runner_before/runner_after.
task_idYesId of the pending, never-launched card to amend.
objectiveNoReplacement objective (task_create's bound); only on a never-launched card, else amend_contract_after_launch. Omit to keep it.
read_firstNoExisting repo files (optional :N or :N-M suffix) to ADD to read_first; omit to leave them.
validationNoShell-free commands that REPLACE the card's validation list; omit to keep it.
allowed_writesNoRepo-relative paths or globs to ADD to allowed_writes; omit to leave them.
required_outputsNoReplacement required_outputs list, each an exact allowed_writes entry; only on a never-launched card, else amend_contract_after_launch. Omit to keep it.
validation_rolesNoOne role per validation command; only with validation. Omit for generic roles.
cancel_live_launchNoTrue to cancel a claimed/live launch to a terminal state and return the card to pending before amending; default false keeps every refusal unchanged.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.13.19
    • addedInput schema / properties / objective
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Replacement objective (task_create's bound); only on a never-launched card, else amend_contract_after_launch. Omit to keep it.",
      +  "title": "Objective"
      +}
    • addedInput schema / properties / required_outputs
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Replacement required_outputs list, each an exact allowed_writes entry; only on a never-launched card, else amend_contract_after_launch. Omit to keep it.",
      +  "title": "Required Outputs"
      +}
  2. Changed1 schema field changedv0.13.4
    • addedInput schema / properties / cancel_live_launch
      Added value: +{
      +  "default": false,
      +  "description": "True to cancel a claimed/live launch to a terminal state and return the card to pending before amending; default false keeps every refusal unchanged.",
      +  "title": "Cancel Live Launch",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changedv0.13.0
    • addedInput schema / properties / runner
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Replacement runner (folded like task_create); refused as runner_reserved:<r> for the manager identity or runner_route_absent:<r> without a workforce route. Reply carries runner_before/runner_after.",
      +  "title": "Runner"
      +}
  4. Addedv0.12.98

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare the write/non-read-only, non-destructive, non-open-world profile, and the description goes well beyond that: it discloses per-field mutation semantics (add-only vs. replace), the card_amended_pending history event, the returned card_sha256, cancellation reason and the fires-and-forgets refusal taxonomy. It does not, however, state authorization requirements for the 'MANAGER WRITE' identity beyond the cancel path, so it falls just short of fully exhaustive.

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-loaded with the operation and its precondition, then organized by field group and by refusal path, so an agent can stop reading once it has what it needs. It is long and error-code dense, and the parenthetical bugfix/refactor aside is somewhat tangled, but nearly every sentence carries operational information.

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 nine-parameter mutating tool with an output schema and multiple conditional modes, this covers purpose, mode selection, field merge semantics, and every documented failure branch. Return values are handled by the output schema and reinforced by mentions of card_sha256 and cancelled_request_id, leaving no significant gap for a correct call.

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

Parameters5/5

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

Although schema coverage is 100% (baseline 3), the description adds semantics the schema cannot express: allowed_writes/read_first are ADD-ONLY while validation REPLACES wholesale, validation_roles must align one-to-one, and required_outputs entries must be exact members of allowed_writes including this call's additions. These merge rules and cross-field constraints are the real invocation risk and are spelled out here.

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 tied to a precise precondition: 'amend a pending card that no request was ever launched for.' It also names the action it replaces ('instead of archiving and re-creating it'), so the agent can distinguish it from aiworkhub_task_create and aiworkhub_task_archive without opening any schema.

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

Usage Guidelines5/5

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

States the positive case (widen a card's scope or fix validation before first launch), the alternative it displaces (archive + re-create), and the precise exclusions — launched, claimed, archived or non-pending cards are refused with named codes. It also describes the escape hatch (cancel_live_launch=true) and exactly which states that path accepts, leaving no routing ambiguity.

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