Skip to main content
Glama

Edit pull request metadata

gh_edit_pr
Destructive

Update a pull request's title, body, labels, assignees, or base branch using the PR number.

Instructions

Destructive write: edit metadata on exactly one pull request after ordinary write authorization. The request may change title, body, labels, assignees, or base and uses authoritative readback for requested fields. Draft-state transition, formal review, merge, branch deletion, and direct head rewrite are separate or unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoReplacement base branch name.
bodyNoReplacement Markdown pull request body.
repoYesGitHub repository name without the owner prefix.
ownerYesGitHub repository owner or organization login.
titleNoReplacement pull request title.
numberYesPull request number to edit.
labels_addNoLabels to add.
assignees_addNoAssignee logins or the @me selector to add.
labels_removeNoLabels to remove.
assignees_removeNoAssignee logins or the @me selector to remove.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
titleYes
numberYes
messageYes
warningNo
request_idNo
write_completedYes
readback_completedYes
precondition_checkedYes
state_matches_requestedYes
Behavior4/5

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

Annotations already mark destructiveHint=true and readOnlyHint=false; description adds unique context like 'uses authoritative readback' and exclusions. While 'destructive write' repeats annotation, the authorization and readback details provide extra behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, densely packed with scope, exclusions, and auth context. Slightly verbose with terms like 'authoritative readback' but no wasted words; front-loaded with 'Destructive write' to warn.

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 high schema coverage and existing annotations, the description adequately covers scope, exclusions, and behavioral expectations. It doesn't discuss response format, but output schema exists, so not needed.

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 coverage is 100% with descriptions on all 10 parameters. The description adds no parameter-specific details beyond listing which fields are editable, so baseline 3 applies – no extra value but no contradiction.

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?

Clear verb+resource: 'edit metadata on exactly one pull request' with explicit fields (title, body, labels, assignees, base). Distinguishes from siblings like gh_create_pr, gh_merge_pr, gh_set_pr_draft_state by excluding those operations.

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 'after ordinary write authorization' and delineates what is not covered (draft-state, review, merge, branch deletion, head rewrite), implicitly guiding selection. Doesn't name specific sibling tools but context from sibling list suffices.

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/fvanevski/gh_mcp'

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