Skip to main content
Glama

opencode_session_abort

Destructive

Aborts a running OpenCode session using its session ID, stopping ongoing work when the session must be halted.

Instructions

Abort a running OpenCode session.

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_abort"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, idempotentHint=false, readOnlyHint=false, and openWorldHint=true, so the safety profile is largely covered. The description adds only the state constraint that the session must be running; it does not say what happens to in-flight prompts or whether the aborted session remains resumable.

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?

A single front-loaded sentence with no filler, hedging, or redundancy. Every word contributes to identifying the action and its target state.

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 tool whose annotations carry the destructive/write profile, the definition is minimally sufficient to invoke correctly. It is thin on consequences of aborting (loss of in-flight work, session state afterward), which matters for a destructive 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 description coverage is 100% with a single required 'sessionId' string, so the schema already fully documents the input. The description adds no format, source, or lookup guidance beyond what the schema states, so the baseline of 3 applies.

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 names a specific verb ('Abort') and a specific resource ('a running OpenCode session'), so the operation is unambiguous. It does not contrast with any sibling tool, but no sibling name suggests an alternative abort path, so the gap is minor.

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 only implied: 'running' signals the precondition that the session must be active, which is the main thing an agent needs to know. There is no explicit when-to-use/when-not guidance, no mention of what to do for an already-finished session, and no named alternative.

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