Read Code Lines with Exact Line Numbers
fs_read_linesRead precise line ranges from code files, returning total line count, start and end positions, and numbered content for reliable slicing of large files.
Instructions
专为 AI 设计的精确代码行读取工具:始终返回总行数、起止行号及带行号的代码内容,支持超大文件按行切片。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "fs_read_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 目标代码文件路径 | |
| endLine | No | 结束行号(1-based) | |
| startLine | No | 起始行号(1-based) |