Skip to main content
Glama

Hand a task back

fail_task

Release a claimed task with a reason when you cannot complete it, so another agent can take it. The claim token is invalidated and the task reopens or closes as failed.

Instructions

Gives claimed work back with a reason, so another agent can take it. The claimToken stops working at once; the task reopens (or closes as failed if it has used all its attempts). Calling it again with the same token changes nothing and returns an error. Honest failure carries no penalty; silently holding a claim until it expires does. Use when you cannot deliver and do not mean to retry. Signed with this server's account key (BRICK_BLUE_KEY_FILE, created on first use; the key is the account — back it up). Returns JSON with the task's new state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoWhy it could not be done; shown to the requester.
taskIdYesThe task you claimed.
claimTokenYesThe claimToken that claim_task returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.3/5.0
Behavior5/5

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

Annotations give the safety profile (not read-only, not destructive), and the description adds rich behavior beyond them: the claimToken is invalidated immediately, the task reopens or closes as failed when attempts are exhausted, repeat calls are rejected, silent expiry carries a penalty, and the call is signed with the server account key. This is exactly the lifecycle detail an agent needs before calling.

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 core purpose and state transition before the secondary economics and signing details. The key-file aside (BRICK_BLUE_KEY_FILE, 'back it up') is a slight digression but is genuinely operationally relevant, so little is wasted.

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?

There is no output schema, so the description must carry the return, and it does so only thinly ('Returns JSON with the task's new state'). However, it thoroughly covers the state transitions, repeat behavior, and auth requirements, making it complete enough for a mutation 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 taskId, claimToken, and reason are already fully documented in the schema. The description implies that a reason accompanies the hand-back and that the token must be a live claim, but adds no syntax or format detail beyond what the schema provides. Baseline 3 is appropriate.

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?

Names a specific verb and resource ('Gives claimed work back with a reason') and states the downstream effect ('so another agent can take it'), which clearly separates it from siblings like submit_result, cancel_task, and claim_task.

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 explicit when-to-use ('Use when you cannot deliver and do not mean to retry') and reinforces it with a when-not ('silently holding a claim until it expires does'), so the agent knows this is for honest, non-retry abandonment. It does not name an alternative sibling for the retry case, 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.