Skip to main content
Glama

Ansvar: EU Compliance & Legal Intelligence

Cancel Workflow

cancel_workflow
Destructive

Cancel an active workflow by id. Cancelled workflows cannot be resumed and are excluded from resume_workflow's active listing; their record stays visible in list_workflows. Idempotent — cancelling an already-cancelled workflow returns the same result. If the gateway itself observed a lifecycle transport failure after the run started this month, cancellation restores the charged allowance under a bounded monthly safeguard.

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": {
      "workflow_id": "<workflow_id>"
    },
    "name": "cancel_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
workflow_idYesId of the workflow run, as returned by start_workflow. Recover a lost id with list_workflows.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / workflow_id / description
      Added value: +"Id of the workflow run, as returned by start_workflow. Recover a lost id with list_workflows."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description adds important behavioral context: cancellation is irreversible ('cannot be resumed'), idempotent, the record remains visible in list_workflows, and a conditional allowance restoration occurs after a gateway-observed lifecycle transport failure. These details materially improve the agent's understanding of side effects and edge cases.

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?

The definition is front-loaded with the core action and uses only a few sentences, each carrying relevant behavioral information. The final sentence about allowance restoration is dense and somewhat conditional, but it is not wasted space.

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?

Given a single required parameter, a destructive annotation, and an existing output schema, the description provides enough context for correct invocation: it covers irreversibility, idempotency, visibility after cancellation, and a conditional billing safeguard.

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%, and the workflow_id schema already explains that the id comes from start_workflow and can be recovered with list_workflows. The description only repeats 'by id' and does not add further meaning beyond the structured schema.

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?

The description states a specific verb and resource ('Cancel an active workflow by id') and distinguishes the tool from related siblings by explaining that cancelled workflows are excluded from resume_workflow's active listing but remain visible in list_workflows.

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?

It clearly indicates this is for cancelling an active workflow and explains the downstream implications for resume_workflow and list_workflows. It does not explicitly state when not to use cancellation or name a preferred alternative for stopping a workflow in another way, so it stops short of a full when/when-not/alternatives guide.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.