Skip to main content
Glama

update_pull_request_branch

Update a pull request branch with the latest changes from the base branch to resolve merge conflicts and keep code current.

Instructions

Update a pull request branch with the latest changes from the base branch. This is equivalent to pressing the 'Update branch' button on GitHub.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
pull_numberYesPull request number
expected_head_shaNoThe expected SHA of the pull request's HEAD ref (for optimistic locking)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It explains the core behavior (updating branch with latest base changes) and provides a helpful GitHub analogy, but doesn't disclose important behavioral traits like whether this requires specific permissions, if it creates merge commits, potential conflicts, or rate limits. The description adds value but leaves significant gaps for a mutation tool.

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 perfectly concise with two sentences that each earn their place: the first states the core functionality, the second provides crucial context with the GitHub analogy. No wasted words, front-loaded with essential information.

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 this is a mutation tool with no annotations but with an output schema (which handles return values), the description provides good core context. The GitHub analogy is particularly helpful. However, for a tool that modifies repository state, more behavioral disclosure about permissions, conflicts, and effects would improve completeness.

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 schema already fully documents all 4 parameters. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score. It doesn't explain how parameters interact or provide usage examples.

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 specific action ('Update a pull request branch') and resource ('pull request branch'), with the GitHub analogy providing concrete context. It distinguishes from sibling tools like 'merge_pull_request' by focusing on branch synchronization rather than final merging.

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 clear context by mentioning it's equivalent to the 'Update branch' button on GitHub, which implies usage when a PR branch is behind the base branch. However, it doesn't explicitly state when NOT to use it or name specific alternatives like 'merge_pull_request' for different 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/software-engineer-mj/github-mcp'

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