Skip to main content
Glama

cancel_execution

Cancel a running execute snippet by passing its execution_id to stop an in-progress code execution.

Instructions

Cancel a running execute snippet.

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": {
      "execution_id": "<execution_id>"
    },
    "name": "cancel_execution"
  }
}

Input Schema

NameRequiredDescriptionDefault
execution_idYesexecution_id from execute.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It signals that only running executions are candidates for cancellation, but says nothing about whether partial output is discarded, whether the cancellation is synchronous, whether permissions are required, or what errors are returned.

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 front-loaded sentence with zero filler. It is efficient, though its brevity leaves gaps rather than waste.

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?

An output schema exists, so return values need not be explained, but this is an unannotated mutation tool with no guidance on failure modes or post-cancellation state. For a destructive operation with zero annotation coverage, the description does too little.

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% with a single required execution_id already documented as coming from execute. The description adds no additional semantics beyond that baseline, which is acceptable given the schema fully covers the parameter.

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 specific verb ("Cancel") and resource ("a running execute snippet"), which lets an agent distinguish it from the sibling execute and poll_execution tools. The phrasing "execute snippet" is slightly vague, but the reference to the execute sibling anchors it.

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 word "running" implies usage only applies to in-flight executions, which is a useful implicit condition. However, it never says when to cancel versus polling with poll_execution, nor what to do if the execution has already finished.

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