| name | create-pull-request |
| description | Create a GitHub Pull Request from the current or specified branch. Use when: opening a PR, submitting code for review, creating a draft PR, publishing a branch as a pull request, proposing changes to a repository. |
| argument-hint | Optionally specify a title, base branch, or whether to create as a draft |
Create a GitHub Pull Request
Gather the necessary information, prepare a clear title and description, then call the tool to open the pull request.
When to Use
- The user wants to open a PR for their current or a specified branch
- The user has finished a feature or fix and wants to submit it for review
- The user wants to create a draft PR to share work in progress
- The user asks to "open a PR", "create a pull request", or "submit for review"
Procedure
1. Gather Information
Determine the required parameters before calling the tool:
- Head branch: If the user has not specified a branch, use workspace or git context to find the current branch name. Do not use
owner:branch format - pass just the branch name (e.g. my-feature).
- Base branch: If the user has not specified a base branch, omit it and let the tool use the repository's default branch.
- Title: If the user has not provided a title, derive one from the branch name, recent commits, or the user's description of their work (see Best Practices below).
- Body: If the user has not provided a description, prepare a concise summary of what changed and why (see Best Practices below).
- Draft: Ask or infer whether the PR should be a draft. Default to non-draft unless the user indicates the work is not ready for review.