get_file_blame
Get git blame for a file at a given ref, mapping line ranges to the commit that last changed them. Limit the blame to specific lines with range_start and range_end.
Instructions
Get git blame for a file at a given ref. Each entry maps a contiguous range of source lines to the commit that last changed them (id, author, authored_date, message). Use range_start/range_end to limit blame to specific lines.
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": {
"project_id": "<project_id>",
"file_path": "<file_path>",
"ref": "<ref>"
},
"name": "get_file_blame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | The name of branch, tag or commit (required by GitLab blame API) | |
| jmespath | No | Optional JMESPath expression filtering the JSON result before return. | |
| file_path | Yes | The full path of the file to blame, relative to repo root | |
| range_end | No | Last line of the blame range (inclusive, 1-based). Both range[start] and range[end] must be set together. | |
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| range_start | No | First line of the blame range (inclusive, 1-based). Both range[start] and range[end] must be set together. |