Create a pull request
create_pull_requestOpens a pull request in a Forgejo, Codeberg, or Gitea repository using source and target branches, title, and optional Markdown body; returns the new PR.
Instructions
Open a pull request in a repository (owner/repo/title/head/base, optional body; requires write mode). Answers with the new pull request in get_pull_request's shape; its number addresses it from then on.
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>",
"title": "<title>",
"head": "<head>",
"base": "<base>"
},
"name": "create_pull_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Target branch the changes should be merged into (e.g. `main`). | |
| body | No | Pull-request body (Markdown). Optional. | |
| head | Yes | Source branch — the branch with your changes. For a cross-repo PR use `user:branch`. | |
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner. | |
| title | Yes | Pull-request title. |