Skip to main content
Glama

fail_task

Signals an unrecoverable task failure with a required reason, preventing silent stops. Provide tab_id for multiple tabs or session_token for client-owned visual sessions.

Instructions

Signal that the task cannot be completed. Include the reason why, but never include passwords, tokens, API keys, or sensitive form values. Call this instead of just stopping when you encounter an unrecoverable problem. Provide tab_id when more than one tab/session could be active. Provide session_token only when ending a client-owned visual session created by start_visual_session; otherwise omit it and keep the normal task-failure semantics. Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesWhy the task cannot be completed (e.g. "Page requires login", "Data not found on page")
tab_idNoOptional target tab id used to associate this outcome with the correct local MCP replay session.
session_tokenNoOptional token returned by start_visual_session. Provide this only when failing a client-owned visual session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers unusual value: a hard prohibition on including secrets/tokens/form values, cross-agent rejection semantics with the TAB_NOT_OWNED error code, and agent-scoped tab ownership. It still doesn't say what happens to the session/task afterward (does it terminate the run?) or what the outcome looks like, and the trailing 'cap (default 8, 1-64)' is never explained.

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 action and the safety constraint, and every sentence is purposeful. The final 'Multi-agent: ... cap configurable (default 8, 1-64)' is telegraphic and ambiguous about what is being capped, which slightly hurts readability.

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?

For a mutation/terminal-state tool with no annotations and no output schema, it covers safety, ownership, error behavior, and parameter conditions well. Missing are the post-call consequences (task/session state after failure) and the meaning of the mentioned cap, so it is not fully self-contained.

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 baseline is 3, but the description adds conditional semantics the schema lacks: tab_id is for disambiguating when multiple tabs/sessions are active, and session_token applies only to a client-owned visual session created by start_visual_session. That materially improves correct invocation of the optional params.

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 outcome: 'Signal that the task cannot be completed,' which is unambiguous against siblings like complete_task, partial_task, and stop_task. It also clarifies the alternative behavior it replaces ('instead of just stopping'), so an agent can pick it 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 Guidelines4/5

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

Gives a clear triggering condition ('unrecoverable problem') and a when-not for session_token ('otherwise omit it and keep the normal task-failure semantics'), plus conditional guidance for tab_id when multiple tabs are active. It stops short of naming the nearest alternative tools (partial_task vs. fail_task) explicitly, so it is strong but not a full routing instruction.

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