Skip to main content
Glama

gemini_agent_cancel

Stops a queued or running agent task and terminates its active process tree, keeping completed file changes available for review.

Instructions

Cancel a queued or running task and stop its active process tree. Previously completed file changes remain for review.

Input Schema

NameRequiredDescriptionDefault
task_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.0

TDQS

A3.9/5.0
Behavior4/5

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

The description discloses the concrete side effect (the process tree is terminated) and, importantly, the partial-effect boundary: previously completed file changes remain for review. That is exactly the kind of context the annotations (readOnlyHint=false, destructiveHint=false) do not convey, and it is consistent with destructiveHint=false since no persisted work is lost.

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?

Two sentences, zero filler, with the action and its scope front-loaded and the preservation guarantee second. Nothing is redundant or buried.

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 single-parameter mutation tool with no output schema, the description covers the essential behavior and its partial effects. It omits edge-case handling, such as what happens if the task id is unknown or the task has already completed, which is a minor remaining gap.

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

Parameters2/5

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

Schema description coverage is 0% and the sole parameter, task_id, is never mentioned in the description. It does not say where the id comes from (e.g., gemini_list_agents or gemini_agent_status) or what format it takes, so the description leaves the only input undocumented.

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 ('Cancel') applied to a specific resource ('a queued or running task') with scope ('stop its active process tree'), which cleanly separates it from siblings like gemini_wait_agent, gemini_agent_status, and gemini_interrupt_agent. An agent can tell what this does without opening the schema.

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

Usage Guidelines3/5

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

The phrase 'queued or running task' implies the usage condition, but the description never states when to prefer this over the closely related gemini_interrupt_agent or what to do for tasks that already finished. Usage is inferable rather than explicit.

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