history
Manage pattern edit history with undo, redo, list, restore, and compare actions. Access recent edits, revert changes, or compare entries.
Instructions
Navigate or inspect the pattern edit history. action=undo reverts the last edit on the targeted session. action=redo replays a previously-undone edit. action=list returns recent entries with timestamps and previews (limit defaults to 10). action=restore jumps the editor to a specific entry by id (current pattern goes on the undo stack). action=compare diffs two entries by id (or one entry vs current pattern). Example: history({ action: "list", limit: 5 }) — recent edits, newest first. For on-disk saved patterns use pattern_store — history deals with the in-memory edit timeline of the current 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": {
"action": "<action>"
},
"name": "history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | History entry ID (action=restore) | |
| id1 | No | First entry ID (action=compare) | |
| id2 | No | Second entry ID (action=compare, default: current pattern) | |
| limit | No | Maximum entries (action=list, default 10) | |
| action | Yes | Which history operation to perform | |
| session_id | No | Optional session ID (#108). Omit to use default session. Note: undo/redo/history stacks are currently server-wide; only the read/write target changes. |