github.repo_file
Retrieve file contents from a GitHub repository by specifying owner/repo and file path, with optional branch, tag, or commit ref. Useful for reading source code or configs.
Instructions
Get file content from a GitHub repo
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": {
"repo": "<repo>",
"path": "<path>"
},
"name": "github.repo_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA | |
| path | Yes | File path within repo | |
| repo | Yes | owner/repo |