preview_text_edit
Validate a proposed full-text file replacement by checking the target path, replacement content, and expected SHA-256 before any edit is saved. Preview only; no write occurs.
Instructions
Use before a requested replacement edit to validate path, proposed full content and the original file SHA-256. Preview only: no write or Owner grant. Do not expose sensitive content in chat.
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": {
"path": "<path>",
"content": "<content>",
"expected_sha256": "<expected_sha256>"
},
"name": "preview_text_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the target within the already-configured Owner read/edit roots; path alone grants no access. | |
| content | Yes | Full proposed text; may contain secrets. Avoid submitting secrets; submitted writes require local Owner review. Preview alone never saves. | |
| expected_sha256 | Yes | Expected 64-character lowercase SHA-256 of current file content; stale values must fail. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||