insert_text
Insert or replace text at specific line numbers in files for precise code modifications without full-file context.
Instructions
Insert or replace text at precise line ranges in files
Ideal for direct line-number operations (from code citations like 12:15:file.ts) and large files where context-heavy editing is inefficient.
TIP: Combine with read_symbol (must use optimize: false!) to edit any symbol anywhere without knowing its file or line range!
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file | |
| from_line | Yes | Starting line number (1-based) | |
| text | Yes | Text to insert | |
| to_line | No | Replace up to this line number (1-based, inclusive). If omitted only inserts |