Skip to main content
Glama

cancel

Stops a queued or running run, or a chain, using its run ID.

Instructions

Stop a queued or running run, or a chain.

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

Input Schema

NameRequiredDescriptionDefault
run_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.3

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not say whether cancellation is graceful or immediate, whether it is idempotent, what happens to partial output, whether it requires ownership permissions, or what a successful response looks like.

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?

A single short sentence with the action front-loaded and no filler. It is efficient, though its brevity is part of why behavioral details are missing.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the definition leaves out too much: effect scope, idempotency, error behavior, and the run_id-versus-chain ambiguity all go unresolved. An agent could invoke it but could not predict the outcome.

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 coverage is 0%, so the description must explain run_id, but it never clarifies the identifier format or whether a chain identifier is acceptable in the same field even though it mentions chains. The mention of "chain" alongside a single run_id parameter actually introduces ambiguity about what values the parameter accepts.

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?

States a concrete verb ("Stop") and resource ("a queued or running run, or a chain"), which is more specific than the bare name "cancel" and lets an agent distinguish it from siblings like run or resume. It stops short of distinguishing it from the sibling "discard", which also sounds like a termination action.

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" implies the states in which the tool applies, so an agent can infer it is for in-flight or pending work rather than completed runs. There is no explicit when-not guidance, no mention of alternatives such as discard or merge, and no stated preconditions.

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