31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
{
|
|
"description": "Read a file with line numbers. Prefer segments over full reads.",
|
|
"prompt": "## file_read\n\nRead a file with line numbers. Prefer segments over full reads.\n\n**Args**: `path` (required), `start`, `end`, or `head`\n\n- `start`/`end`: 1-indexed line numbers, inclusive. Must be strings. Max segment: 2000 lines.\n- No start/end: reads up to 500 lines from line 1.\n- `head`: read first N lines (alternative to start/end).\n\n```\nfile_read(path=\"/abs/path\")\nfile_read(path=\"/abs/path\", start=\"100\", end=\"200\")\nfile_read(path=\"/abs/path\", head=\"50\")\n```\n\n- `start`/`end` are strings even though they represent numbers.\n- Use `head` as alternative to `start`/`end`.\n\n**Constraints**: Absolute paths only.",
|
|
"args": {
|
|
"type": "object",
|
|
"required": [
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Absolute path to file"
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"description": "1-indexed start line (default: 1)"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"description": "1-indexed end line, inclusive (max 2000 line segment)"
|
|
},
|
|
"head": {
|
|
"type": "string",
|
|
"description": "Read first N lines (alternative to start/end)"
|
|
}
|
|
}
|
|
},
|
|
"tier": "cold",
|
|
"scope": "read"
|
|
}
|