Read or restore one strategy file
file_historyList per-file history or explicitly restore one historical file into the current complete strategy snapshot. Listing is read-only. Restoring creates a new immutable strategy revision and preserves all other current files and Rules; it never restores an old whole snapshot. Use sourceRevisionId and expectedHeadRevisionId from history for restoration, then read back the saved file with get_file.
Set "action" to choose the operation. Only send the fields listed for that action.
action="list": Read one strategy file history
Required fields: path. Returns bounded metadata for actual content, metadata and deletion changes of one owned strategy file, with per-file versions, source strategy revision UUIDs and current headRevisionId. Historical preview is read-only: this tool does not select an editing base, restore files or change conversation strategy state. Omit strategyId and revisionId for the current attached strategy; for another named owned strategy pass its exact legacy Strategy id and revisionId from list_strategies/list_revisions. Use get_file with a returned strategyRevisionId to inspect a historical file. Do not mistake fileVersion for the whole strategy version or UUID. Use nextBefore to read older entries. To restore a selected file, use file_history(action="restore") with its source strategyRevisionId and the current headRevisionId. Never copy the old whole snapshot to restore one file.
action="restore": Restore one strategy file
Required fields: sourceRevisionId, path, expectedHeadRevisionId. Restores one explicitly requested historical file into the current complete snapshot and creates a new immutable whole-strategy revision. Get sourceRevisionId and expectedHeadRevisionId from file_history(action="list"); the source and current destination must belong to the same owned strategy. All unrelated current Rules, helpers and dependencies are preserved. Never restore an old whole file map to restore one file. Restoring rules.json explicitly restores that Rules file only; restoring main.py does not restore old Rules. Omit strategyId for the current attached strategy; pass the exact named target legacy Strategy id for another owned strategy. The server uses only trusted conversation identity. A changed head returns a visible conflict: refresh history before retrying. Read back the returned new revisionId with get_file before claiming restoration succeeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Used with action="list", action="restore". Required for action="list", action="restore". | |
| limit | No | Used with action="list". | |
| action | Yes | Which operation to run: "list", "restore". See the tool description for each one. | |
| before | No | Exclusive per-file version cursor returned by the preceding history page. Used with action="list". | |
| revisionId | No | Owned revision selector. Omit with strategyId for the current attached strategy; this is a read selector, not a write base. Used with action="list". | |
| strategyId | No | action="list": Legacy Strategy id. Omit with revisionId for the current attached strategy. | action="restore": Legacy Strategy id. Omit for the current attached strategy. Used with action="list", action="restore". | |
| sourceRevisionId | No | Exact strategy revision UUID containing the selected historical file, returned by file_history(action="list"). Used with action="restore". Required for action="restore". | |
| expectedHeadRevisionId | No | Exact current headRevisionId returned by file_history(action="list"); restoration fails if the strategy advances. Used with action="restore". Required for action="restore". |