Skip to main content
Glama
Antigravity OpenCode Delegate

Antigravity OpenCode Delegate

opencode_cancel

Cancels a running OpenCode background job and its owned local process tree, then polls status until cancellation completes.

Instructions

Cancel one OpenCode background job and its owned local process tree. Poll status until the job reaches cancelled.

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

Input Schema

NameRequiredDescriptionDefault
jobIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations present, the description carries the full load and does meaningful work: it discloses that cancellation is destructive to an entire local process tree, that the effect is not instantaneous (the job must be polled until 'cancelled'), and that the unit of action is a background job. It omits permission requirements, idempotency on already-terminal jobs, and what data or partial work is lost — gaps that matter for an irreversible 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 sentences, front-loaded with the action and its blast radius, then the verification step. No filler, no restatement of the tool name.

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 single-parameter, no-output-schema tool, this is close to sufficient: it establishes destructive scope and async verification. Missing only the provenance of jobId and error behavior for unknown or already-cancelled jobs, which are modest gaps given the tool's simplicity.

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% and, while the single jobId is typed as a UUID with a pattern, nothing in the description says where a jobId comes from (presumably opencode_execute or opencode_status) or whether the zero-UUID sentinel in the pattern has special meaning. For a one-parameter tool where the parameter is the entire input, the description adds essentially no semantic value beyond the schema.

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), a specific resource (one OpenCode background job) and scope (its owned local process tree), which no sibling tool covers — opencode_status reads, opencode_execute runs. It stops short of explicitly contrasting itself with opencode_status, which is the nearest adjacent operation.

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?

"Poll status until the job reaches cancelled" gives a follow-up workflow step, implying this is an async operation that needs verification. It never states when cancel is appropriate versus letting a job finish, what happens to an already-finished job, or whether the polling target is this tool or opencode_status — the direction is implied rather than stated.

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