Skip to main content
Glama

Cancel agent task

cancel_agent_task

Stops a running agent task by taskId, letting MCP clients halt work initiated through ask_agent when it is no longer needed.

Instructions

Cancel a running agent task.

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>"
    },
    "name": "cancel_agent_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite the request is meant for (e.g. abc.atlassian.net); checked against the sign-in
agentNoWhich agent to use; defaults to "rovo"
targetNoNo targets are configured
taskIdYestaskId returned by ask_agent

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?

Annotations already declare this is a non-read-only, non-destructive, open-world mutation, and the description is consistent with that. The word "running" adds a useful behavioral constraint (only in-flight tasks appear cancellable), but nothing is said about idempotency, what happens to partial results, or whether cancellation is reversible.

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. Nothing is redundant with the title or schema.

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 state-changing operation with no output schema, the definition leaves the outcome unspecified: what the call returns, what terminal state the task lands in, and any error behavior for already-finished tasks. Adequate to invoke correctly, but incomplete about consequences.

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%, so site, agent, target, and taskId are all documented in structured fields, including the note that taskId comes from ask_agent. The description adds no meaning beyond that, which is the expected baseline when the schema does the work.

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?

"Cancel a running agent task" states a specific verb (cancel) and resource (agent task), and the qualifier "running" narrows the scope. It is clearly distinguishable from siblings like get_agent_task and ask_agent by verb, though it does not explicitly name or contrast with them.

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 guidance on when to cancel versus polling with get_agent_task or re-issuing with ask_agent, and no stated preconditions beyond the word "running." The agent must infer the workflow entirely from sibling names and the schema.

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