Skip to main content
Glama

opencode_session_unrevert

Destructive

Undo reverts by restoring all reverted messages in a session. Provide the session ID, optionally with a project directory to target a specific project.

Instructions

Restore all reverted messages in a session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID
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

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, so the safety profile is covered. The description adds the scope 'all reverted messages' but does not disclose side effects, irreversibility, or operational consequences beyond what annotations already communicate. No contradiction with 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?

A single, front-loaded sentence with no filler. Every word contributes to understanding the operation.

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?

For a mutation tool with a complete parameter schema and an output schema, the description is nearly sufficient. The only meaningful gap is the absence of explicit when-to-use guidance relative to opencode_session_revert and other session operations.

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 both 'id' and 'directory' described in the schema. The description adds no additional parameter-level meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Restore') and a clear resource ('all reverted messages in a session'). It unambiguously conveys the tool's function and is naturally distinguished from the sibling opencode_session_revert.

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 usage is implied by the name and description—it is the counterpart to opencode_session_revert—but the description does not explicitly state when to use this tool versus alternatives or mention any prerequisites. There is no exclusionary guidance.

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