Skip to main content
Glama

create_pull_request

Create a pull request to merge a source branch into a target branch, with support for cross-fork branches, labels, assignees, and milestones. Returns the new PR number.

Instructions

Create a pull request. title, head (source branch), and base (target branch) are required. For cross-fork PRs use 'owner:branch' in head. labels takes label IDs (numbers) — call list_labels first. Prefix the title with WIP: or [WIP] to prevent accidental merge while work is in progress. Returns the created PR including its number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesTarget branch name (the branch you want to merge INTO)
bodyNoPull request body/description (supports Markdown)
headYesSource branch name (the branch you want to merge FROM). For forks use 'owner:branch'
repoNoRepository name (defaults to GITEA_DEFAULT_REPO)
ownerNoRepository owner (defaults to GITEA_DEFAULT_OWNER)
titleYesPull request title
labelsNoList of label IDs
assigneeNoAssignee username
assigneesNoList of assignee usernames
milestoneNoMilestone ID
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the returned PR includes its 'number', and that prefixing title with WIP prevents accidental merge. This goes beyond a simple creation note.

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?

Three sentences, front-loaded with core purpose, and every sentence adds valuable information without redundancy. It is appropriately sized for the parameter count.

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 10 parameters (3 required) and no output schema, the description covers essential usage: required params, fork handling, labels, and return info. It could mention default repo/owner behavior, but those are environment-specific. Overall, it provides sufficient context for correct invocation.

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 coverage is 100% but the description adds critical nuances: the syntax for cross-fork branches ('owner:branch'), that labels are numeric IDs (schema says 'List of label IDs' but doesn't emphasize they are numbers), and the WIP prefix convention. This significantly enriches the schema.

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 starts with 'Create a pull request.' which is a clear specific verb+resource. It distinguishes itself from siblings like list_pull_requests and merge_pull_request by focusing on creation.

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?

It states required parameters, mentions that for cross-fork PRs use 'owner:branch', advises to call list_labels first for labels, and explains the WIP prefix convention. It doesn't explicitly contrast with siblings but the usage context is clear.

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/amonstack/gitea_mcp'

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