AI makes mistakes! Undisk makes recovery instant: every write is versioned, every file is reversible.
See it heal →

What it does

Compare two versions of a file and get a structured line-by-line diff. Use list_versions to find version IDs, then diff any two points in the file’s history. Returns an array of changes, each with type (‘added’, ‘removed’, or ‘modified’), lineRange (start/end), and before/after content strings. Useful for reviewing what changed between writes or before deciding whether to restore.

Required scope

versions:read

Parameters

ParameterTypeRequiredDescription
pathstringYesPath of the file to diff
from_versionstringYesStarting version ID (the ‘before’ state)
to_versionstringYesEnding version ID (the ‘after’ state)