Skip to main content
Glama

task_fail

Mark a task as failed and emit a task.failed event so orchestration systems can record errors, categorize codes, and flag recoverability.

Instructions

Mark a task as failed and emit task.failed event

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": {
      "taskId": "<taskId>",
      "error": "<error>"
    },
    "name": "task_fail"
  }
}

Input Schema

NameRequiredDescriptionDefault
errorYesError message describing the failure
taskIdYesID of the task that failed
errorCodeNoError code for categorization
recoverableNoWhether the error is recoverable

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses that a task.failed event is emitted, but says nothing about idempotency, whether the task must be running, whether the state change is terminal/reversible, or any permission requirements.

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?

A single front-loaded sentence with zero filler; the primary effect comes first and the side effect follows.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation tool with no annotations and no output schema, the description is thin: it omits state preconditions, idempotency, and what happens to the task record afterwards. The schema covers the inputs, but the behavioral contract is only partially described.

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 description coverage is 100% with all four parameters documented (error, taskId, errorCode, recoverable). The description adds no meaning beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Mark a task as failed" states a specific verb and resource, and "emit task.failed event" adds the side effect. It is clearly distinct from task_complete/task_progress by naming the opposite outcome, though it never names a sibling explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of the required task state before failing, and no comparison to alternatives such as workflow_abort or task_progress. The only usage signal is the implied one from the verb "failed".

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