Skip to main content
Glama

opencode_job_cancel

Destructive

Cancel a running OpenCode job by aborting its session, stopping all work in that session.

Instructions

Explicitly abort the OpenCode session owned by a job. This also stops other work in that session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
errorNo
jobIdNo
resultNo
statusYes
isErrorYes
directoryNo
messageIdNo
sessionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructive/non-idempotent behavior; the description adds useful consequence detail by telling the agent that aborting the session also stops other work in that session. It does not contradict annotations.

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 short sentences, front-loaded with the primary action and a second sentence for the important side effect. No filler.

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 one-parameter destructive action with annotations and an output schema, the description covers what it does and the main side effect. It does not specify the job lifecycle outcome or async behavior, but those are minor given the schema and annotations.

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?

The schema provides no description for jobId and coverage is 0%, but the description ties the operation to 'a job,' so jobId is inferable as that job's ID. It still never explicitly says what jobId means or how to obtain it, so the description only partially compensates for the empty 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?

States a specific action—explicitly abort—and a target: the OpenCode session owned by a job. It clearly separates this job-scoped cancel/abort from direct session tools like opencode_session_abort, and the side-effect sentence reinforces the resource being acted on.

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 context is implied rather than spelled out: an agent can infer that this should be used when it needs to cancel a job and stop its session, but the description never names alternatives like opencode_session_abort or states when not to use it.

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

Deploy Server

Other Tools