simulate_edit
Apply in-memory range edits to files in a simulation session to preview changes before writing to disk. Tracks versions and baseline diagnostics for accurate testing.
Instructions
Apply a range edit to a file within a simulation session. Changes are held in-memory only. The session captures baseline diagnostics on first edit to each file, then tracks versions for subsequent edits. Returns the new version number after the edit. All line/column positions are 1-indexed (matching editor line numbers).
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>",
"file_path": "<file_path>",
"start_line": "<start_line>",
"start_column": "<start_column>",
"end_line": "<end_line>",
"end_column": "<end_column>",
"new_text": "<new_text>"
},
"name": "simulate_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | Yes | ||
| new_text | Yes | ||
| file_path | Yes | ||
| end_column | Yes | ||
| session_id | Yes | ||
| start_line | Yes | ||
| start_column | Yes |