Skip to main content
Glama

Interrupt OpenCode run

opencode_session_interrupt

Stops the current run in a session without ending it, so you can halt activity and keep the session available for further use.

Instructions

Stop the current run in a session. The session stays usable afterwards.

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": {
      "sessionID": "<sessionID>"
    },
    "name": "opencode_session_interrupt"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIDYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, so the agent already knows this is a mutation; the description earns credit for adding the post-state guarantee that the session remains usable, which is genuinely non-obvious. It omits how the stop occurs (graceful vs. immediate), what happens to partial output, and the error behavior when no run is active.

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, zero filler, with the core action front-loaded and the post-condition immediately after. Nothing could be removed without losing information.

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?

For a one-parameter, no-output-schema tool this covers the essential action and the resulting session state, which is the minimum an agent needs. It leaves open the failure mode (no run to interrupt) and the disposition of in-progress work, which matter for a stop operation.

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 coverage is 0%, so the single sessionID parameter is documented nowhere except the loose phrase "in a session," which at least ties it to a session identifier. It does not clarify whether the ID is a session handle, a run handle, or what format it takes, nor what happens if the ID refers to a session with no active run.

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?

"Stop the current run in a session" gives a specific verb (stop) and a specific resource (the current run), which separates it from siblings like opencode_session_delete (removes a session) and opencode_session_prompt (starts work). It stops short of 5 because the distinction is only implied by the word "run" rather than stated against a named alternative.

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 is implied: an agent can infer it should call this when a run is in flight and needs to be halted. The line "The session stays usable afterwards" hints at why one would choose this over deletion, but no when-to-use condition, prerequisite, or explicit alternative is stated.

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