Ensure Lines In File
ensure_lines_in_fileEnsure specified lines are present or absent in a remote file, optionally creating the file if it does not exist.
Instructions
Ensures specific lines are present or absent in a file
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": {
"sessionId": "<sessionId>",
"path": "<path>",
"lines": "<lines>"
},
"name": "ensure_lines_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| lines | Yes | Lines to manage | |
| state | No | Desired state | |
| sessionId | Yes | SSH session ID | |
| createIfMissing | No | Create file if it does not exist |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| added | Yes |