Skip to main content
Glama

create_pull_request

Create a pull request by specifying title, source branch (head), and target branch (base). Supports cross-fork PRs and optional labels, assignees, or milestones.

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 exist, so description carries the burden. It discloses creation behavior, return value including 'number', and special input formats (cross-fork, labels as IDs, WIP prefix). Could mention permissions or idempotency but adequate.

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 efficient sentences that are front-loaded with the core action, then key details. No redundancy, every sentence adds value.

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?

Lacks output schema, but description notes 'Returns the created PR including its `number`', which is sufficient. Covers essential behavioral aspects and parameter nuances. Could mention default repo/owner (from env vars) but schema already does.

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

Parameters4/5

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

Schema covers all parameters (100% coverage), baseline 3. Description adds value beyond schema: explains cross-fork format for 'head', numeric IDs for 'labels', and WIP prefix for 'title'. Enhances understanding.

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 'Create a pull request' and specifies required parameters. It distinguishes from sibling tools like 'list_pull_requests' (list) and 'merge_pull_request' (merge), though not explicitly, but the purpose is unmistakable.

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?

Provides good usage context: required params, cross-fork syntax, labels prerequisite (call list_labels first), and WIP naming convention to prevent accidental merges. Lacks explicit when-not-to-use but covers key scenarios.

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