read_file
读取 GitHub 仓库中一个文本文件的内容(源码、配置、Markdown 等)。path 为仓库内完整路径。branch 缺省时自动使用默认分支。大文件建议传 start_line/end_line 分段读取(返回带 L行号 前缀,便于引用);不传则全量返回(上限 40k 字符)。二进制/超大文件会返回说明。
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": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 文件完整路径,如 package.json 或 src/index.ts | |
| repo | Yes | 仓库名 | |
| owner | Yes | 仓库属主 | |
| branch | No | 分支名,缺省用默认分支 | |
| end_line | No | 结束行(含),缺省读到文件末尾 | |
| start_line | No | 起始行(1-based,含),配合 end_line 分段读取大文件 |