delete_from_file
Remove specific lines from a file by specifying the start and end line numbers, with content verification to ensure accuracy. Simplifies file editing and data cleanup tasks.
Instructions
Delete content from a file between specified line numbers.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
file_path | Yes | Absolute path to the file | |
line_end | Yes | Ending line number (1-based) | |
line_start | Yes | Starting line number (1-based) | |
line_start_contents | Yes | Expected content of the starting line (used for verification) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"file_path": {
"description": "Absolute path to the file",
"type": "string"
},
"line_end": {
"description": "Ending line number (1-based)",
"exclusiveMinimum": 0,
"type": "integer"
},
"line_start": {
"description": "Starting line number (1-based)",
"exclusiveMinimum": 0,
"type": "integer"
},
"line_start_contents": {
"description": "Expected content of the starting line (used for verification)",
"type": "string"
}
},
"required": [
"file_path",
"line_start",
"line_end",
"line_start_contents"
],
"type": "object"
}