get_file
Retrieve the contents of a file from a GitHub repository. Specify the repository and file path, and optionally a branch, tag, or commit SHA.
Instructions
Get the content of a file from a repository.
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": "get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path inside the repo (e.g. "src/index.ts"). | |
| repo | Yes | Repository in "owner/repo" format. | |
| branch | No | Branch, tag, or commit SHA (default: repo default branch). |