Skip to main content
Glama

opencode_cancel

Stops a running or retrying task started by this bridge using SIGTERM then SIGKILL on its process group, leaving other sessions untouched. Reports finished tasks as already complete.

Instructions

Cancel a running or retrying task started by this bridge: SIGTERM, then SIGKILL, to its whole process group (never touches other sessions). A finished task is reported as such.

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": "opencode_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the escalation sequence (SIGTERM then SIGKILL), that the signal targets the entire process group, and the blast radius (other sessions untouched). It leaves out whether the call blocks until termination and what permissions or preconditions are required for a destructive operation.

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?

Two tightly written sentences with the destructive mechanism and blast radius front-loaded and the edge case (already-finished task) last. No redundant or filler wording.

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

Completeness4/5

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

For a destructive kill tool with no annotations and no output schema, the description supplies the critical safety context (process-group scope, isolation from other sessions, behavior on finished tasks). The remaining gap is identifier semantics, which no structured field covers.

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 description coverage is 0% for the single required "id" parameter, so the description must compensate. It only implies that the id refers to a task started by this bridge; it never states the identifier format, whether it is a task id or session id, or how to obtain it.

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 uses a specific verb ("Cancel") with a precisely scoped resource ("a running or retrying task started by this bridge") and states the boundary "never touches other sessions." An agent can distinguish this from opencode_processes or opencode_status without inspecting schemas.

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 the target state ("running or retrying") and the note that "a finished task is reported as such" tells the agent what happens if the task already ended. However, no alternative tool is named (e.g., inspecting via opencode_processes first) and no when-not-to-cancel conditions are given.

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