generate_pr
Generates pull request titles and descriptions from git changes, using commit history and templates to produce structured summaries.
Instructions
Generate a PR title and description.
IMPORTANT: The returned 'description' has a PLACEHOLDER Purpose. You MUST rewrite it using purposeContext.commitTitles, purposeContext.commitBullets, and purposeGuidelines BEFORE showing to the user.
You MUST also rewrite the title to reflect ALL changes, not just the branch name. Read ALL commitTitles and commitBullets to understand the full scope before writing.
FORMAT:
1-2 changes: prose sentence(s)
3+ changes: intro sentence + bullet points
Example (3+ changes): "Enables automatic Slack notifications to PR authors when builds fail.
Extracts PR author from GitHub PR metadata
Maps GitHub usernames to Slack user IDs for @mentions
Posts threaded failure notifications
Includes unit tests for notification functionality"
Show ONLY the final title + rewritten description. Never mention "MCP provided" or show raw purposeContext.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | No | Path to the git repository. IMPORTANT: Always pass the user's current project/workspace directory. | |
| baseBranch | No | Base branch to compare against. Auto-detects if not specified. | |
| titleSummary | No | Summary for the PR title (extracted from branch if not provided) | |
| summary | No | Summary text for the PR description | |
| testPlan | No | Test plan text | |
| additionalSections | No | Additional section content keyed by section name | |
| templatePreset | No | Force a specific template preset (default, minimal, detailed, mobile, frontend, backend, devops, security, ml). |