read_file
Retrieve file contents efficiently, either in full or by specific line ranges, using a file path. Option to display line numbers for enhanced readability and precise file navigation.
Instructions
Read the contents of a file. You can read the entire file or specific line ranges.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
end_line | No | Ending line number (1-based). Cannot be used with full=true | |
file_path | Yes | Absolute path to the file to read | |
full | No | Read the entire file. Cannot be used with start_line or end_line | |
show_line_numbers | No | Whether to prefix each line with its line number | |
start_line | No | Starting line number (1-based). Cannot be used with full=true |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"end_line": {
"description": "Ending line number (1-based). Cannot be used with full=true",
"exclusiveMinimum": 0,
"type": "integer"
},
"file_path": {
"description": "Absolute path to the file to read",
"type": "string"
},
"full": {
"description": "Read the entire file. Cannot be used with start_line or end_line",
"type": "boolean"
},
"show_line_numbers": {
"default": false,
"description": "Whether to prefix each line with its line number",
"type": "boolean"
},
"start_line": {
"description": "Starting line number (1-based). Cannot be used with full=true",
"exclusiveMinimum": 0,
"type": "integer"
}
},
"required": [
"file_path"
],
"type": "object"
}