Resolve a ref to a commit
resolve_refResolve a branch, tag, or revision to its full commit SHA and identify it as branch, tag, or commit. Use it to confirm a ref exists before reading files from it.
Instructions
Resolve a branch, tag, or revision to the full commit SHA it points at, and say what it is (branch, tag, or commit for anything else). Use this to confirm a ref exists before reading files from it. If the ref is missing, the error lists similar names, and it says so when the copy could not be refreshed, since then a missing ref proves nothing.
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": {
"ref": "<ref>"
},
"name": "resolve_ref"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Branch, tag, or commit SHA, e.g. 'develop' or 'fix/PROJ-7608'. | |
| project | No | GitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT. |