github_get_file_content
Retrieve file contents from a GitHub repository by specifying owner, repository, and file path. Optionally specify a branch, tag, or commit SHA to fetch content from a particular version.
Instructions
Get the contents of a file in 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": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>"
},
"name": "github_get_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA | |
| path | Yes | File path in repository | |
| repo | Yes | Repository name | |
| owner | Yes | Repository owner username |