Insert
insertPlace text at a chosen line in a file, including the beginning or end, to perform line-based edits using an absolute path.
Instructions
Insert text at a specific line in a file.
insert_line = 0: Insert at the beginning
insert_line = N: Insert after line N
insert_line = -1: Insert at the end
insert_text should typically end with a newline
Use absolute paths
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>",
"insert_line": "<insert_line>",
"insert_text": "<insert_text>"
},
"name": "insert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file | |
| insert_line | Yes | Line number to insert after (0 = beginning, -1 = end) | |
| insert_text | Yes | Text to insert (should end with newline) |