Skip to main content
Glama

opencode_session_revert

Destructive

Revert a session to a previous message by providing the session ID and message ID, optionally targeting a specific part or project directory.

Instructions

Revert a message in a session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID
partIDNoPart ID to revert (optional)
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
messageIDYesMessage ID to revert

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds no behavioral context beyond that, such as whether the revert is reversible, what happens to dependent messages, or whether partID affects scope. It neither contradicts the annotations nor explains side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler words. It is concise, though extremely terse, which slightly limits its informativeness.

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

Completeness2/5

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

Given that opencode_session_unrevert exists as a sibling and partID is optional, an agent needs more context to understand what 'revert' changes and how it differs from unrevert. The output schema and annotations cover some safety aspects, but the description leaves the exact semantics under-specified 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?

The input schema covers 100% of parameters with meaningful descriptions for id, messageID, partID, and directory. The tool description itself adds no parameter-level meaning, which aligns with the baseline for complete schema coverage.

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 uses the specific verb 'revert' and identifies the resource as 'a message in a session', giving the agent a clear sense of the operation. It does not explicitly contrast with siblings like opencode_session_unrevert, but the basic purpose is unambiguous.

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 on when to use this tool versus alternatives such as opencode_session_unrevert or opencode_session_update. The description simply states the operation without specifying prerequisites, context, or exclusions.

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