Skip to main content
Glama

Cancel a task or round

cancel
DestructiveIdempotent

Stop a running task or round by ID and return its cancelled or already-finished result. Unstarted seats skip, published answers stay, and CLI side effects are not undone.

Instructions

Stop a task or round; return its cancelled or already-finished result. Running seats become absent, unstarted seats skip, published answers stay and undecided answers stay private. CLI side effects are not undone.

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": {
      "id": "<id>"
    },
    "name": "cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAn invocation_id from start_agent or a round_id.

Output Schema

NameRequiredDescriptionDefault
roundNo
invocationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.17.0
    • addedOutput schema / $defs / InvocationPayload / properties / account
      Added value: +{
      +  "title": "Account",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.13.1
    • addedOutput schema / $defs / TaskIsolationSummaryPayload / properties / auto_released
      Added value: +{
      +  "title": "Auto Released",
      +  "type": "boolean"
      +}
  3. Changed8 schema fields changedv1.9.0
    • changedOutput schema / $defs / CommittedEntryPayload / properties / identity / $ref
      Previous value: -"#/$defs/MemberIdentity"New value: +"#/$defs/ReplyIdentity"
    • changedOutput schema / $defs / InvocationPayload / properties / identity / $ref
      Previous value: -"#/$defs/MemberIdentity"New value: +"#/$defs/ReplyIdentity"
    • addedOutput schema / $defs / InvocationPayload / properties / isolation
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/TaskIsolationPayload"
      +    },
      +    {
      +      "$ref": "#/$defs/TaskIsolationSummaryPayload"
      +    }
      +  ],
      +  "title": "Isolation"
      +}
    • removedOutput schema / $defs / MemberIdentity
      Removed value: -{
      -  "properties": {
      -    "cli": {
      -      "title": "Cli",
      -      "type": "string"
      -    },
      -    "handle": {
      -      "title": "Handle",
      -      "type": "string"
      -    },
      -    "handle_short": {
      -      "title": "Handle Short",
      -      "type": "string"
      -    },
      -    "key": {
      -      "title": "Key",
      -      "type": "string"
      -    },
      -    "model": {
      -      "title": "Model",
      -      "type": "string"
      -    },
      -    "model_short": {
      -      "title": "Model Short",
      -      "type": "string"
      -    },
      -    "model_source": {
      -      "enum": [
      -        "native",
      -        "requested",
      -        "unknown"
      -      ],
      -      "title": "Model Source",
      -      "type": "string"
      -    },
      -    "numbered": {
      -      "title": "Numbered",
      -      "type": "boolean"
      -    },
      -    "ordinal": {
      -      "title": "Ordinal",
      -      "type": "integer"
      -    },
      -    "provider": {
      -      "title": "Provider",
      -      "type": "string"
      -    },
      -    "role": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Role"
      -    },
      -    "spoken_name": {
      -      "title": "Spoken Name",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "key",
      -    "provider",
      -    "cli",
      -    "model",
      -    "model_short",
      -    "model_source",
      -    "ordinal",
      -    "numbered",
      -    "handle",
      -    "handle_short",
      -    "spoken_name"
      -  ],
      -  "title": "MemberIdentity",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / ReplyIdentity
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
    • changedOutput schema / $defs / SeatRunPayload / properties / identity / $ref
      Previous value: -"#/$defs/MemberIdentity"New value: +"#/$defs/ReplyIdentity"
    • addedOutput schema / $defs / TaskIsolationPayload
      Added value: +{
      +  "properties": {
      +    "base_oid": {
      +      "title": "Base Oid",
      +      "type": "string"
      +    },
      +    "branch": {
      +      "title": "Branch",
      +      "type": "string"
      +    },
      +    "cwd": {
      +      "title": "Cwd",
      +      "type": "string"
      +    },
      +    "id": {
      +      "title": "Id",
      +      "type": "string"
      +    },
      +    "path": {
      +      "title": "Path",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "path",
      +    "cwd",
      +    "branch"
      +  ],
      +  "title": "TaskIsolationPayload",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / TaskIsolationSummaryPayload
      Added value: +{
      +  "properties": {
      +    "actual_branch": {
      +      "title": "Actual Branch",
      +      "type": "string"
      +    },
      +    "branch": {
      +      "title": "Branch",
      +      "type": "string"
      +    },
      +    "changed_files_from_base": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Changed Files From Base",
      +      "type": "array"
      +    },
      +    "error": {
      +      "title": "Error",
      +      "type": "string"
      +    },
      +    "head_oid": {
      +      "title": "Head Oid",
      +      "type": "string"
      +    },
      +    "id": {
      +      "title": "Id",
      +      "type": "string"
      +    },
      +    "nested_repos": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Nested Repos",
      +      "type": "array"
      +    },
      +    "path": {
      +      "title": "Path",
      +      "type": "string"
      +    },
      +    "summary_status": {
      +      "enum": [
      +        "complete",
      +        "no_baseline",
      +        "error"
      +      ],
      +      "title": "Summary Status",
      +      "type": "string"
      +    },
      +    "truncated": {
      +      "title": "Truncated",
      +      "type": "boolean"
      +    },
      +    "uncommitted": {
      +      "title": "Uncommitted",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "path",
      +    "branch",
      +    "summary_status"
      +  ],
      +  "title": "TaskIsolationSummaryPayload",
      +  "type": "object"
      +}
  4. Changed4 schema fields changedv1.3.0
    • addedOutput schema / $defs / CommittedEntryPayload / properties / identity
      Added value: +{
      +  "$ref": "#/$defs/MemberIdentity"
      +}
    • addedOutput schema / $defs / InvocationPayload / properties / identity
      Added value: +{
      +  "$ref": "#/$defs/MemberIdentity"
      +}
    • addedOutput schema / $defs / MemberIdentity
      Added value: +{
      +  "properties": {
      +    "cli": {
      +      "title": "Cli",
      +      "type": "string"
      +    },
      +    "handle": {
      +      "title": "Handle",
      +      "type": "string"
      +    },
      +    "handle_short": {
      +      "title": "Handle Short",
      +      "type": "string"
      +    },
      +    "key": {
      +      "title": "Key",
      +      "type": "string"
      +    },
      +    "model": {
      +      "title": "Model",
      +      "type": "string"
      +    },
      +    "model_short": {
      +      "title": "Model Short",
      +      "type": "string"
      +    },
      +    "model_source": {
      +      "enum": [
      +        "native",
      +        "requested",
      +        "unknown"
      +      ],
      +      "title": "Model Source",
      +      "type": "string"
      +    },
      +    "numbered": {
      +      "title": "Numbered",
      +      "type": "boolean"
      +    },
      +    "ordinal": {
      +      "title": "Ordinal",
      +      "type": "integer"
      +    },
      +    "provider": {
      +      "title": "Provider",
      +      "type": "string"
      +    },
      +    "role": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Role"
      +    },
      +    "spoken_name": {
      +      "title": "Spoken Name",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "key",
      +    "provider",
      +    "cli",
      +    "model",
      +    "model_short",
      +    "model_source",
      +    "ordinal",
      +    "numbered",
      +    "handle",
      +    "handle_short",
      +    "spoken_name"
      +  ],
      +  "title": "MemberIdentity",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / SeatRunPayload / properties / identity
      Added value: +{
      +  "$ref": "#/$defs/MemberIdentity"
      +}
  5. Changed4 schema fields changedv1.1.0
    • addedOutput schema / $defs / InvocationPayload / properties / prompts
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/PromptPayload"
      +  },
      +  "title": "Prompts",
      +  "type": "array"
      +}
    • changedOutput schema / $defs / InvocationPayload / properties / reason / enum
      Previous value: -[
      -  "started",
      -  "wait_elapsed",
      -  "execution_blocked",
      -  "finished"
      -]New value: +[
      +  "started",
      +  "wait_elapsed",
      +  "execution_blocked",
      +  "prompt_pending",
      +  "finished"
      +]
    • addedOutput schema / $defs / PromptPayload
      Added value: +{
      +  "properties": {
      +    "content_source": {
      +      "const": "subagent_data",
      +      "title": "Content Source",
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "title": "Created At",
      +      "type": "string"
      +    },
      +    "kind": {
      +      "enum": [
      +        "permission",
      +        "question"
      +      ],
      +      "title": "Kind",
      +      "type": "string"
      +    },
      +    "prompt_id": {
      +      "title": "Prompt Id",
      +      "type": "string"
      +    },
      +    "questions": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Questions",
      +      "type": "array"
      +    },
      +    "tool_input": {
      +      "title": "Tool Input",
      +      "type": "string"
      +    },
      +    "tool_name": {
      +      "title": "Tool Name",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "prompt_id",
      +    "kind",
      +    "tool_name",
      +    "tool_input",
      +    "created_at",
      +    "content_source"
      +  ],
      +  "title": "PromptPayload",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / SeatRunPayload / properties / prompts
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/PromptPayload"
      +  },
      +  "title": "Prompts",
      +  "type": "array"
      +}
  6. Changed1 schema field changedv0.65.0
    • changedOutput schema / $defs / InvocationPayload / required
      Previous value: -[
      -  "invocation_id",
      -  "status",
      -  "reason",
      -  "elapsed_ms"
      -]New value: +[
      +  "invocation_id",
      +  "status",
      +  "reason"
      +]
  7. Changed3 schema fields changedv0.53.1
    • addedOutput schema / $defs / InvocationPayload / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Warnings",
      +  "type": "array"
      +}
    • addedOutput schema / $defs / SeatRunPayload / properties / output_returned
      Added value: +{
      +  "title": "Output Returned",
      +  "type": "boolean"
      +}
    • addedOutput schema / $defs / SeatRunPayload / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Warnings",
      +  "type": "array"
      +}
  8. Changed1 schema field changedv0.49.0
    • addedInput schema / additionalProperties
      Added value: +false
  9. Addedv0.35.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotentHint=true, and the description goes well beyond them: it enumerates per-seat outcomes (running seats become absent, unstarted seats skip), states that published answers persist while undecided answers stay private, and warns that CLI side effects are not undone. That is exactly the state-mutation detail an agent cannot get from the structured fields.

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?

Three tight sentences, front-loaded with the action and outcome, then the state effects, then the caveat about side effects. No filler and nothing repeated from the schema.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, and the description instead covers the parts structured data cannot: idempotency behavior, per-seat effects, answer visibility, and irreversible side effects. For a destructive one-parameter mutation tool, nothing an agent needs is missing.

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% and the single `id` parameter already documents that it accepts an invocation_id or round_id. The description reinforces the dual id semantics ('a task or round') but adds no format or resolution rules 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?

The description opens with a specific verb and resource ('Stop a task or round') and states the return contract ('its cancelled or already-finished result'). It clearly reads as the inverse of start_agent/run_round, though it never names a sibling explicitly to draw the boundary.

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?

Usage context is clear: it works on either an invocation_id or a round_id, and it is safe to call on something already finished because it returns the finished result. What is missing is an explicit 'use X instead when...' pointer or any stated precondition for when cancelling is appropriate.

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