opencode_session_revert
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
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": {
"id": "<id>",
"messageID": "<messageID>"
},
"name": "opencode_session_revert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session ID | |
| partID | No | Part ID to revert (optional) | |
| directory | No | Absolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory. | |
| messageID | Yes | Message ID to revert |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |