phabricator_repository_file_content
Reads a repository file's text at a given path and commit or branch, with line-based paging for long files and metadata for binary files.
Instructions
Read a file's text at a path and commit/branch. Long files are paged: follow the closing note or set startLine/lineCount. A branch or other ref is resolved to a commit, which the note names so later pages read the same version. Binary files return metadata; files over byteLimit return tooHuge.
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>",
"commit": "<commit>"
},
"name": "phabricator_repository_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path in the repository (e.g., "src/index.ts") | |
| branch | No | Branch name | |
| commit | Yes | Commit hash or branch name | |
| timeout | No | Query timeout in seconds | |
| byteLimit | No | Max file size in bytes (default 2097152) | |
| lineCount | No | Lines to return | |
| startLine | No | First line, 1-based | |
| repository | No | Repository callsign, short name, or PHID | |
| startColumn | No | Where to start in startLine, 1-based, in UTF-16 code units, as a previous note gives it |