get_commits
Retrieve recent commits from a GitHub repository, optionally filtered by branch or file path, to review code history and changes.
Instructions
Get recent commits for a branch or file path.
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>"
},
"name": "get_commits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional file path to filter commits that touched this file. | |
| repo | Yes | Repository in "owner/repo" format. | |
| branch | No | Branch name (default: repo default branch). | |
| max_results | No | Number of commits to return (default: 20, max: 100). |