Skip to main content
Glama

Create a pull request

create_pull_request

Opens a pull request in a Forgejo, Codeberg, or Gitea repository using source and target branches, title, and optional Markdown body; returns the new PR.

Instructions

Open a pull request in a repository (owner/repo/title/head/base, optional body; requires write mode). Answers with the new pull request in get_pull_request's shape; its number addresses it from then on.

Input Schema

NameRequiredDescriptionDefault
baseYesTarget branch the changes should be merged into (e.g. `main`).
bodyNoPull-request body (Markdown). Optional.
headYesSource branch — the branch with your changes. For a cross-repo PR use `user:branch`.
repoYesRepository name.
ownerYesRepository owner.
titleYesPull-request title.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the mutation/non-idempotent profile is covered structurally. The description still adds real value by naming the write-mode auth prerequisite, the return shape, and the stable `number` handle — things annotations cannot express. It omits failure behavior (duplicate PRs, invalid head/base) which keeps it below a 5.

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?

Two tight sentences: the action and its inputs first, then the return value and the identifier for follow-up calls. No filler, no 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?

With no output schema, the description helpfully explains the return value by reference to get_pull_request's shape and highlights `number` as the handle for downstream tools. The write-mode requirement covers auth. Missing only error/precondition behavior for a 6-parameter, open-world mutation.

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 merely enumerates the parameter names it already lists in the schema and notes body is optional, adding no syntax or format guidance beyond what the schema gives (e.g. the cross-repo `user:branch` convention in the schema is not echoed).

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?

Uses a specific verb (open/create) plus resource (pull request) and immediately names the scoping entities (owner/repo) and parameters. An agent can distinguish it from list_pull_requests, get_pull_request, and merge_pull_request without inspecting the schema.

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

Usage Guidelines4/5

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

States the key enabling condition 'requires write mode', which directly activates the enable_write_mode sibling, and implies creation-before-merge ordering. It stops short of explicit alternatives or exclusions (e.g. what to do if a PR already exists for head/base, or when to create_branch first).

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