Skip to main content
Glama

opencode_session_abort

Destructive

Abort a running OpenCode session by supplying its session ID, halting autonomous coding tasks to prevent unwanted changes or free up resources.

Instructions

Abort a running session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID to abort
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description is consistent with them. It adds the useful scoping that only 'running' sessions are targeted, but it does not describe what happens to the session after abort or whether child tasks are stopped.

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 four words, front-loaded with the action, and contains no filler or redundant phrasing. Every word earns its place.

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 simple destructive tool, annotations and the output schema cover much of the safety and return-value context. However, there is no mention of what 'abort' changes, what happens to related sessions, or when this should be preferred over sibling session tools, making it adequate but not complete.

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 provides 100% description coverage for both parameters, id and directory, so the baseline is 3. The description adds no parameter-specific meaning, but the schema already explains what each field is for.

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 states a specific action ('abort') and a specific target ('a running session'), which is clear and meaningful. It is not a tautology, and the 'running' qualifier hints at how it differs from session_delete or session_revert, though it never names those siblings explicitly.

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

Usage Guidelines2/5

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

There is no guidance about when to use this tool versus the many session_* alternatives such as session_delete, session_revert, or session_update. The only usage signal is the verb 'abort,' leaving an agent to infer when this tool is the right choice.

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

Deploy Server

Other Tools