read_file
Extract content from a file by specifying a path, optional row range, and JSON parsing. Ideal for retrieving specific data segments or structured content in terminal operations.
Instructions
Read content from a file with optional row selection
Args:
path: Path to the file
start_row: Starting row to read from (0-based, optional)
end_row: Ending row to read to (0-based, inclusive, optional)
as_json: If True, attempt to parse file content as JSON (optional)
Returns:
File content or selected lines, optionally parsed as JSON
Input Schema
Name | Required | Description | Default |
---|---|---|---|
as_json | No | ||
end_row | No | ||
path | Yes | ||
start_row | No |
Input Schema (JSON Schema)
{
"properties": {
"as_json": {
"default": false,
"title": "As Json",
"type": "boolean"
},
"end_row": {
"default": null,
"title": "End Row",
"type": "integer"
},
"path": {
"title": "Path",
"type": "string"
},
"start_row": {
"default": null,
"title": "Start Row",
"type": "integer"
}
},
"required": [
"path"
],
"title": "read_fileArguments",
"type": "object"
}