insert_code
Insert new code lines before or after an existing symbol while matching indentation; writes only after parse validation to prevent syntax breaks.
Instructions
Insert new_text on its own lines before or after an existing symbol (where='before'|'after'), matching its indentation. Parse-validated before writing.
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": {
"name": "<name>",
"new_text": "<new_text>"
},
"name": "insert_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | No | ||
| force | No | ||
| where | No | after | |
| dry_run | No | ||
| new_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |