Skip to main content
Glama

opencode_cancel_run

Destructive

Cancel a running or queued agent run by providing its job ID. Stop unwanted tasks and free up resources immediately.

Instructions

Cancel a running or queued agent run.

Return Format

{"success": bool, "message": str, "data": {"job_id": str}}

Examples

opencode_cancel_run(job_id="abc123")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID to cancel

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already mark this as destructive, but the description adds useful behavioral context: it only works on running or queued runs, and it specifies the return format. This goes beyond the annotations without contradicting them.

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 concise and well-structured: one sentence stating purpose, then a clearly labeled return format and example. Every section earns its place with no wasted words.

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

Completeness5/5

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

This is a simple one-parameter tool with an output schema already providing return structure. The description adequately covers the purpose, scope, and usage, making it complete for the tool's complexity.

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 input schema fully describes the only parameter (job_id) as a string with description 'Job ID to cancel.' The description includes an example invocation that reinforces usage but does not add substantial semantic meaning 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 states the tool's function: 'Cancel a running or queued agent run.' It uses a specific verb (cancel) and resource (agent run), and distinguishes it from sibling tools like run_agent, get_run_status, and list_runs by specifying the action and applicable states.

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 indicates the tool is for running or queued runs, which gives clear context for when to use it. However, it does not explicitly mention alternatives or when not to use it, falling short of full usage guidance.

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/sandraschi/opencode-cli-mcp'

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