Skip to main content
Glama
jeremysball

opencode-cc-tool

by jeremysball

Cancel a running opencode task

opencode_cancel

Stop a running opencode task by sending SIGTERM to its process group, escalating to SIGKILL after a grace period. Poll opencode_status to confirm cancellation.

Instructions

Stop a running task: sends SIGTERM to the task's whole process group (opencode and any subprocess it spawned), escalating to SIGKILL after a grace period if it hasn't exited. A finished task's status is unaffected and returns a note instead of an error. Poll opencode_status afterward; the task moves to status 'cancelled' once its exit event lands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask id returned by opencode_dispatch.
grace_msNoMilliseconds to wait after SIGTERM before escalating to SIGKILL. Defaults to 5000.
Behavior5/5

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

With no annotations provided, the description fully discloses the termination strategy: sends SIGTERM to the whole process group, escalates to SIGKILL after a grace period, and that finished tasks are unaffected. This is comprehensive.

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?

Three sentences, no fluff. The first states the main action, the second adds escalation details, and the third covers edge cases and post-action steps. Every sentence adds value.

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?

The tool has no output schema, so the description should explain the return value. It only mentions returning a note for finished tasks, but not for successful cancellations. This gap reduces completeness despite good coverage of parameters and behavior.

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%, so the schema already documents both parameters well. The description adds context about the process group but does not significantly enhance parameter understanding beyond the 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?

The description clearly starts with 'Stop a running task' and details the termination process (SIGTERM then SIGKILL). It effectively distinguishes from sibling tools like opencode_dispatch or opencode_list by focusing solely on cancellation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states when to use the tool (to stop a running task) and how it handles finished tasks (returns a note). It advises polling opencode_status afterward, but lacks explicit comparison to alternatives or 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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeremysball/opencode-cc-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server