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
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path of the file to diff |
from_version | string | Yes | Starting version ID (the ‘before’ state) |
to_version | string | Yes | Ending version ID (the ‘after’ state) |