Skip to main content
Glama

OpenCode Runs

opencode_runs
Destructive

Start, poll status, list recent, or cancel opencode agent runs. Launch fire-and-forget or blocking runs, then track or stop them via the CLI HTTP API.

Instructions

Manage opencode agent runs: start, poll status, list recent, or cancel.

Return Format

{"success": bool, "message": str, "data": dict} Fire-and-forget starts return a job_id; poll with action="status".

Examples

opencode_runs(action="start", prompt="Refactor main.py", wait=False) opencode_runs(action="status", job_id="abc123") opencode_runs(action="list", limit=20, offset=0)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoBlock until done (start; default false = fire-and-forget)
limitNoPage size (list)
actionYesstart: launch an agent run. status: poll a run. list: recent runs. cancel: stop a run.
job_idNoJob ID (required for status/cancel)
offsetNoPage offset (list)
promptNoAgent prompt (required for start)
projectNoProject directory (optional, start)
timeoutNoMax seconds for the run (start)
output_formatNoOutput format (start)text

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already indicate destructiveHint=true, so the tool's potential to cancel runs is known. The description adds the return format and explains that fire-and-forget starts return a job_id, which is useful operational context. However, it does not disclose specific side effects of start or cancel actions, such as resource consumption or state changes, which would be valuable beyond the 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?

The description is well-structured with a concise summary, a return format section, and three practical examples. It is front-loaded with the core purpose, and every sentence contributes to understanding the tool. There is no redundancy or unnecessary detail.

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?

The description provides the return format, covers all four actions in the header, and includes examples for start, status, and list. Since an output schema exists, return values are already documented. The only minor gap is the lack of mention of cancel behavior or error handling, but overall it is sufficiently complete for an agent to use the tool effectively.

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 already provides 100% parameter coverage, including descriptions for each field. The description's examples (e.g., action='start', prompt='...', wait=False) reinforce parameter usage without adding new semantic meaning. Since the schema does the heavy lifting, a baseline score of 3 is appropriate.

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?

The description clearly states the tool's purpose: 'Manage opencode agent runs: start, poll status, list recent, or cancel.' This specifies the verb and resource, and the examples further clarify usage. However, it does not explicitly distinguish this composite tool from sibling tools like opencode_run_agent or opencode_cancel_run, so it loses a point for lack of differentiation.

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?

The description implies when to use the tool by listing actions and providing examples, but it gives no explicit guidance on when to choose this tool over dedicated siblings. There are no exclusion criteria or alternative suggestions, so an agent may be uncertain which tool to invoke for a specific run operation (e.g., simply polling status).

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