Skip to main content
Glama

code_cancel

DestructiveIdempotent

Cancel a background code job by its job ID to stop work that is no longer needed. Detached child processes may continue running.

Instructions

Cancel a background code job. Detached child processes may survive.

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": {
      "jobId": "<jobId>"
    },
    "name": "code_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.5/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is partly covered. The description adds a meaningful behavioral caveat beyond the annotations: 'Detached child processes may survive,' warning that cancellation may not terminate everything.

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?

The description is two short sentences with no wasted wording. The primary action is front-loaded, and the caveat follows immediately.

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 low-complexity, single-parameter tool with rich annotations, the description covers purpose and one important side effect. It still leaves gaps around parameter sourcing and how it differs from code_job_delete, which an agent must infer.

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?

The only parameter is jobId, and schema description coverage is 0%; the schema defines it as a UUID but provides no textual explanation. The description does not explain what jobId refers to, where to obtain it, or whether it should come from code_start or code_status.

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 states a specific verb and resource: 'Cancel a background code job.' This is clear enough to distinguish it from status or execute tools, but it does not explicitly contrast with the similarly named code_job_delete sibling.

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?

Usage is implied by 'Cancel a background code job,' which gives the agent a basic context for when to call it. However, there is no explicit guidance on when to prefer this over code_job_delete, nor any exclusions or prerequisites.

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