sed_add
Add sed expressions to a batch queue for a file on an OpenWrt router. Edits accumulate until execution, enabling complex multi-edit operations to be built and applied efficiently.
Instructions
Add one or more sed expressions to the batch queue for a file. Expressions are NOT executed immediately — they accumulate until sed_execute is called. This allows building up complex multi-edit operations efficiently.
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>",
"expressions": "<expressions>"
},
"name": "sed_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the target file on the router | |
| expressions | Yes | Array of sed expressions to queue. Examples: 's/old/new/g' (substitute), '5d' (delete line 5), '3i\\new line' (insert before line 3), '$a\\appended line' (append at end), '10,20s/foo/bar/' (substitute in line range) |