Skip to main content
Glama

Create pull request

gh_create_pr

Create a GitHub pull request from a head branch to a base branch, with optional labels, assignees, and reviewers.

Instructions

Additive write: create exactly one pull request from the specified bounded head and base selectors after ordinary write authorization. Optional labels, assignees, and review requests are bounded and read back when created. It does not approve, merge, or change another pull request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesBase branch name.
bodyYesMarkdown pull request body.
headYesHead branch or owner:branch selector.
repoYesGitHub repository name without the owner prefix.
draftNo
ownerYesGitHub repository owner or organization login.
titleYesPull request title.
labelsNoOptional labels to apply.
assigneesNoOptional GitHub user logins or the @me selector to assign.
review_usersNoOptional GitHub user logins to request for review.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
titleYes
numberYes
messageYes
warningNo
request_idNo
write_completedYes
readback_completedYes
precondition_checkedYes
state_matches_requestedYes
Behavior4/5

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

Annotations already indicate readOnlyHint=false (write op), destructiveHint=false (non-destructive), and openWorldHint=true. The description adds important behavioral context: it is additive (creates exactly one PR), checks authorization, bounds optional inputs (labels, assignees, review requests), and reads them back when created. It also clarifies it does not approve, merge, or change other PRs, which goes beyond the annotations. No contradiction.

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 concise, two sentences, front-loaded with the main purpose and then additional context. It is efficient with no wasted words. Could structure the positive/negative statements slightly more explicitly, but it is well-sized.

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

Completeness4/5

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

Given the tool's moderate complexity (10 params, mostly described in schema, and an output schema exists), the description covers the essential addition of behavioral boundaries (exactly one PR, bounded inputs, exclusion of other mutations). Since output schema exists, return values need no elaboration. The only minor gap is lack of usage prerequisites (e.g., need for auth, base branch existence), but that is acceptable.

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

Parameters3/5

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

Schema description coverage is 90%, so most parameters already have descriptions. The tool description adds a little by mentioning 'bounded head and base selectors' and that optional labels/assignees/review requests are bounded and read back, but it does not add new meaning beyond the schema's existing parameter descriptions. Baseline 3 is appropriate.

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 states a specific verb and resource ('create exactly one pull request from the specified bounded head and base selectors') and clearly distinguishes it from sibling tools by specifying it does not approve, merge, or change another pull request. This differentiates it from gh_merge_pr, gh_approve_pr, gh_set_pr_draft_state, and gh_edit_pr.

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

Usage Guidelines3/5

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

The description implies when to use this tool: when creating a PR, and explicitly states what it does not do (approve, merge, change another PR). However, it does not mention alternatives or any context for when to prefer this over other creation/edit tools. It provides no explicit when-not guidance or conditions like required permissions.

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/fvanevski/gh_mcp'

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