code.setLines
Replace specific lines in a code node to update code sections efficiently without rewriting entire files.
Instructions
Replace a range of lines in a code node. More efficient than setCode for partial updates.
The number of lines being replaced equals the length of the 'lines' array. Lines at startLine through startLine + lines.length - 1 will be replaced.
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": {
"nodeId": "<nodeId>",
"startLine": "<startLine>",
"lines": "<lines>"
},
"name": "code.setLines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Code node ID or name | |
| startLine | Yes | Starting line number (0-indexed) | |
| lines | Yes | Array of line strings to insert/replace |