Skip to main content
Glama

set_task_state

Report a claimed task's session state as working, waiting_input, or errored without extending its lease, so blocked or failed work stays visible to humans and orchestrators.

Instructions

Report the session state of a task you have claimed — working, waiting_input, or errored — without extending the lease. Use this to flag that you are blocked on input or hit an error: the claim stays visible as held-but-stuck instead of faking liveness. Humans and orchestrators see the state via list_tasks/get_task. Fails with 409 if you no longer hold an active claim. Hosted API only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesThe session state to set
detailNoFree-text detail (max 500 chars, e.g. 'needs prod API key', 'build failed: missing dep')
task_idYesThe claimed task ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.19.0
    • removedInput schema / properties / task_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / task_id / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  2. Addedv1.18.2
  3. Removedv1.13.1
  4. Addedv1.9.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the non-lease-extending semantics, the resulting "held-but-stuck" visibility model, downstream observers (list_tasks/get_task), the 409 failure condition, and the hosted-only hosting constraint. That is exactly the behavioral context annotations would otherwise provide.

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?

Three sentences, front-loaded with the action and its key distinction, then usage, then failure/visibility/support constraints. No filler or repetition.

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?

No output schema and no annotations, so the description must cover behavior and constraints — which it does (lease semantics, visibility path, 409, hosted-only). An agent has everything needed to decide to call it and to interpret failure.

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 description coverage is 100%, so the 3 is the floor. The description adds intent beyond the raw enum by tying "waiting_input" and "errored" to concrete agent situations (blocked on input, hit an error), though it says nothing about the optional "detail" parameter's role or the 500-char limit.

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?

Specific verb+resource ("Report the session state of a task you have claimed") with the exact enum values named inline. It cleanly distinguishes itself from sibling heartbeat_task by stating it acts "without extending the lease," and from update_task by scoping to session state only.

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?

"Use this to flag that you are blocked on input or hit an error" gives a clear positive trigger, and "Fails with 409 if you no longer hold an active claim" plus "Hosted API only" give prerequisites/constraints. It does not explicitly name heartbeat_task as the contrasting alternative for liveness, so it stops short of a 5.

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