Skip to main content
Glama

github_create_pull_request

Destructive

Create a pull request with file changes in a GitHub repository. Prefer the exact owner from github_list_repositories; 'repo' also accepts the combined 'owner/name' form. Creates a new branch from the base branch, commits the specified files, and opens a PR. Use this instead of github_commit_files when changes should go through code review rather than being committed directly.

Input Schema

NameRequiredDescriptionDefault
bodyNoPull request description in markdown.
repoYesRepository name. Also accepts the combined 'owner/name' form.
draftNoIf true, create as a draft PR.
filesYesFiles to create or update. Each entry has a 'path' and 'content'.
ownerYesRepository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. May be embedded in 'repo' as 'owner/name'.
titleYesPull request title.
base_branchNoTarget branch to merge into. Defaults to the repository's default branch.
head_branchYesName for the new branch (e.g. 'feat/add-ci-pipeline'). Must not already exist.
commit_messageYesGit commit message for the changes.
confirm_large_deletionsNoPaths from 'files' whose new content is intentionally much shorter than the file it replaces. A commit that would replace an existing file with less than half of its content is refused unless that path is listed here. Leave this out unless a refusal named the path and removing that much is the change you intend.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / confirm_large_deletions
      Added value: +{
      +  "description": "Paths from 'files' whose new content is intentionally much shorter than the file it replaces. A commit that would replace an existing file with less than half of its content is refused unless that path is listed here. Leave this out unless a refusal named the path and removing that much is the change you intend.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / files / items / properties / content / description
      Previous value: -"File content as a string."New value: +"The COMPLETE new content of the file. The commit replaces the whole file with this string; it is not a patch, so anything left out is deleted."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is carried. The description adds real behavioral context beyond that: the tool creates a branch, commits full file contents, and opens a PR as a multi-step side effect. It does not restate the destructive/non-idempotent nature, but that gap is covered by annotations.

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

Conciseness5/5

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

Four tight sentences, front-loaded with the core action, followed by parameter sourcing and the sibling-routing rule. No filler or restatement of the title.

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?

For a 10-parameter destructive tool with no output schema, the description explains the full side-effect chain and the key alternative. It leaves preconditions like 'head_branch must not already exist' and the large-deletion confirmation behavior to the schema, which is a minor omission.

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 100%, so the baseline is 3. The description's note that 'repo' accepts the combined 'owner/name' form and to prefer the exact owner largely duplicates the owner/repo schema descriptions, adding little beyond them.

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?

States a specific verb and resource ('Create a pull request with file changes in a GitHub repository') and expands the mechanics: new branch from base, commits files, opens PR. It explicitly distinguishes itself from the sibling github_commit_files, so an agent can route correctly without opening schemas.

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?

Gives an explicit when-to-use-vs-alternative rule: 'Use this instead of github_commit_files when changes should go through code review rather than being committed directly.' It also advises sourcing the owner from github_list_repositories, covering both the routing decision and a prerequisite call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources