read_file_lines
Extracts specific lines from a text file by specifying the path, line offset, and maximum lines to read. Supports custom text encoding, enabling precise file content retrieval based on user-defined parameters.
Instructions
Read specific lines from a text file.
Args:
path: Path to the file
offset: Line offset (0-based, starts at first line)
limit: Maximum number of lines to read (None for all remaining)
encoding: Text encoding (default: utf-8)
ctx: MCP context
Returns:
File content and metadata
Input Schema
Name | Required | Description | Default |
---|---|---|---|
encoding | No | utf-8 | |
limit | No | ||
offset | No | ||
path | Yes |
Input Schema (JSON Schema)
{
"properties": {
"encoding": {
"default": "utf-8",
"title": "Encoding",
"type": "string"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
},
"offset": {
"default": 0,
"title": "Offset",
"type": "integer"
},
"path": {
"title": "Path",
"type": "string"
}
},
"required": [
"path"
],
"title": "read_file_linesArguments",
"type": "object"
}