Skip to main content
Glama

Git Create Or Update PR

git_create_or_update_pr

Push the current branch to GitHub and either create a new pull request or update an existing one for the branch, optionally embedding a Leantime ticket.

Instructions

Push the current branch and create or update its GitHub PR (the aipr workflow). Requires gh authenticated.

The agent supplies title and body. If ticket_id is given, the Leantime ticket markdown block is appended to the body. Detects an existing PR for the branch and edits it, otherwise creates a new one.

Args:

  • title (string): PR title

  • body (string): PR body (markdown)

  • ticket_id (string|number, optional): Leantime ticket to embed

  • base (string, optional): base branch for a new PR

  • draft (boolean, optional): open as draft (new PRs only)

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { url, number, action: "created" | "updated" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesPR title
bodyYesPR body in markdown
ticket_idNoLeantime ticket id to embed
baseNoBase branch (new PRs only)
draftNoOpen as draft (new PRs only)
repo_pathNoPath to the git repository. Defaults to the server's working directory.
Behavior4/5

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

The description adds behavioral context beyond annotations, such as the push action, authentication requirement, and the detect-edit-or-create logic. Annotations already indicate mutability (readOnlyHint=false, idempotentHint=false), so the description enriches without contradiction.

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?

The description is concise and well-structured: a lead sentence, prerequisite, behavior summary, and an Args section. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given the tool's complexity (6 params, no output schema), the description is thorough. It covers the workflow, prerequisites, parameter details, return format, and integration with Leantime. It is complete for an agent to invoke correctly.

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 coverage is 100%, but the description adds meaning for ticket_id (appends Leantime block), base (for new PRs), draft (new PRs only), and repo_path (default cwd). It improves clarity beyond the schema alone.

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 the tool pushes the current branch and creates or updates its GitHub PR, with a specific verb and resource. It distinguishes from sibling tools like git_commit and git_create_branch by focusing on PR management.

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?

The description provides context for when to use the tool, including prerequisites (gh authenticated) and behavioral details (detects existing PR or creates new one). It lacks explicit alternatives or when-not-to-use guidance, but the sibling context makes differentiation 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/BenBen2109/ai-git-mcp'

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