Read File
fs_read_fileRead file contents with optional line-range selection, precise line numbers for code review, or base64 encoding for binary data.
Instructions
读取文件内容,支持按行分段读取、附加精确行号(withLineNumbers=true)或 base64 读取。
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 目标文件路径 | |
| endLine | No | 结束行号(1-based,仅 utf8 模式有效) | |
| encoding | No | 读取编码 | utf8 |
| startLine | No | 起始行号(1-based,仅 utf8 模式有效) | |
| withLineNumbers | No | 是否在每行前附带精确 1-based 行号(AI 看代码推荐开启) |