Preview edits
preview_editsPreview a batch of edits on a throwaway document copy, reporting exactly what would change without saving. Ensure the preview and the subsequent apply match by using the same edit engine.
Instructions
Report what a batch of edits WOULD do, writing nothing. Runs the same engine against a throwaway copy of the document as it stands on disk right now — including every edit already applied in this session — so a green preview and the apply that follows it cannot disagree. author and mode are required because the engine's refusals depend on both.
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": {
"session_id": "<session_id>",
"edits": "<edits>",
"author": "<author>"
},
"name": "preview_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | tracked | |
| edits | Yes | ||
| author | Yes | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caveat | Yes | ||
| outcomes | Yes | ||
| session_id | Yes | ||
| would_apply | Yes |