docs/tools/create_pr
AgenticCode — GitHub Integration

Create Pull Request

CLI Tool Name: create_pr

Opens a pull request in a GitHub repository. Built with a two-step verification flow: the agent previews changes using confirmed=false before executing them. This eliminates accidental PR creations when drafting branches.

Parameters

ParameterTypeRequiredDescription
repostringyesGitHub repo in 'owner/repo' format.
titlestringyesPull request title.
headstringyesThe branch containing your changes.
bodystringnoPull request description (markdown).
basestringnoThe target branch to merge into. Default: repo's default branch.
draftbooleannoOpen as a draft PR. Default: false.
confirmedbooleannoMust be true to execute. When false (default), returns preview.

Example output

json
{
  "status": "success",
  "action": "create",
  "pr_url": "https://github.com/myorg/myrepo/pull/43",
  "pr_number": 43
}

How to use it

Your assistant can instantly draft and file pull requests for you as soon as you push your code to your remote:

example prompt

Create a pull request in 'myorg/myrepo' from 'feature/login' to 'main' titled 'Implement OAuth login'.

[note]
GitHub Token required. Configure your token via the GUI Hub or by setting the GITHUB_TOKEN environment variable in your AI client. Note that it needs repository write permissions.

Explore other AgenticStore MCP tools