Git Pull Request
git_prCreate, list, or merge pull requests across GitHub, GitLab, Forgejo, Gitea, and Bitbucket using installed provider CLIs or REST API tokens.
Instructions
Create, list, or merge pull requests / merge requests on the detected forge provider (GitHub, GitLab, Forgejo, Gitea, Bitbucket). Uses the provider CLI (gh/glab/tea) when installed, otherwise the provider REST API with a *_TOKEN env var.
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": {
"action": "<action>"
},
"name": "git_pr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Target branch (create, default main). | |
| body | No | PR/MR body/description (create). | |
| head | No | Source branch (create, default HEAD). | |
| state | No | Filter for list (default open). | |
| title | No | PR/MR title (create). | |
| action | Yes | Pull request operation. | |
| method | No | Merge method (merge). | |
| number | No | PR/MR number (merge). | |
| repo_path | No | Absolute path to the local Git repository. If omitted, falls back to the server default set via the GIT_REPO_PATH environment variable or --repo-path CLI argument. | |
| response_format | No | Output format for the response. | markdown |