Skip to main content
Glama
kmandana
by kmandana

create_pr

Create a pull request on GitHub or GitLab after the user reviews and approves an auto-generated title and description. Requires explicit user confirmation.

Instructions

Create a pull request on the detected platform (GitHub/GitLab).

CRITICAL WORKFLOW - YOU MUST FOLLOW THESE STEPS IN ORDER:

  1. Call get_pr_context to analyze the changes

  2. Generate PR title and description based on the diff

  3. SHOW the generated PR title and body to the user in your response

  4. ASK the user: "Should I create this PR?" and WAIT for their response

  5. ONLY call this tool AFTER the user explicitly approves (says "yes", "proceed", "create it", etc.)

  6. Set user_approved=True when calling this tool

DO NOT call this tool in the same response where you generate the PR description. The user MUST see the content and approve it first.

Args: title: PR title (keep it concise, ~50 chars) body: PR description (formatted markdown) base_branch: Base branch (e.g., "main", "dev") user_approved: REQUIRED - Must be True. Confirms user has seen and approved the PR content. head_branch: Head branch (defaults to current branch) draft: Create as draft PR (default: False) repo_path: Path to git repository (optional, defaults to Claude's working directory)

Returns: Success message with PR URL or error message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
draftNo
titleYes
repo_pathNo
base_branchYes
head_branchNo
user_approvedYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It describes the behavior: creates a PR, requires user approval, and returns a success message with URL or error. It mentions defaults (head_branch defaults to current branch, draft default False). It does not detail side effects like CI triggers, but the essential behavior is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a critical workflow section and clear parameter explanations. It is somewhat long but every sentence is necessary for safe usage. Minor improvements could be made by condensing the workflow steps, but overall it's effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (7 parameters, 4 required) and no annotations, the description is remarkably complete. It explains the workflow, each parameter's role, and the return value. It also addresses prerequisite context (get_pr_context) and user approval, leaving no critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the tool description adds significant meaning for each parameter: e.g., 'title: PR title (keep it concise, ~50 chars)', 'user_approved: REQUIRED - Must be True.' This goes well beyond the bare schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create a pull request on the detected platform (GitHub/GitLab).' It uses a specific verb and resource, and distinguishes itself from siblings like commit_changes and review_changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a detailed step-by-step workflow, explicitly stating when to use the tool (only after user approval) and when not to (not in the same response as generating the description). It also names a prerequisite tool (get_pr_context) and includes critical warnings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kmandana/DevNarrate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server