file_insert_lines
Insert text at a chosen line position without replacing existing content, with dry-run previews and undoable writes.
Instructions
Insert text at a defined position and return operation_id and undo_available.
line is a 1-based line number. position is before or after that line, or
end to append at end of file, which takes no line number; there is no
sentinel line number for end of file. Additive: no existing line is
replaced. dry_run returns a unified diff preview and writes nothing.
Otherwise the operation is recorded and undoable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | ||
| path | Yes | ||
| content | Yes | ||
| dry_run | No | ||
| position | No | after | |
| expected_hash | No | ||
| expected_content | No |