github_git_refs_get
Fetch a Git branch or tag reference and the commit SHA it points to, so you can read a branch's current head before building on it. Provide owner, repo, and ref (heads/main or tags/v1.0).
Instructions
Get a reference and the commit SHA it points at — how you read a branch's current head before building on it. ref is heads/main or tags/v1.0, without the refs/ prefix.
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>",
"ref": "<ref>"
},
"name": "github_git_refs_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | The Git reference, formatted as `heads/BRANCH_NAME` for a branch or `tags/TAG_NAME` for a tag. Without the `refs/` prefix. | |
| repo | Yes | The name of the repository without the `.git` extension. The name is not case sensitive. | |
| owner | Yes | The account owner of the repository. The name is not case sensitive. |