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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed32 schema fields changedv0.8.1
    • changedInput schema / properties / assignees_add / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "maxLength": 39,
      +      "minLength": 1,
      +      "pattern": "^(?:@me|[A-Za-z0-9](?:[A-Za-z0-9-]{0,38}))$",
      +      "type": "string"
      +    },
      +    "maxItems": 10,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / assignees_add / description
      Added value: +"Assignee logins or the @me selector to add."
    • changedInput schema / properties / assignees_remove / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "maxLength": 39,
      +      "minLength": 1,
      +      "pattern": "^(?:@me|[A-Za-z0-9](?:[A-Za-z0-9-]{0,38}))$",
      +      "type": "string"
      +    },
      +    "maxItems": 10,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / assignees_remove / description
      Added value: +"Assignee logins or the @me selector to remove."
    • changedInput schema / properties / base / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 1024,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / base / description
      Added value: +"Replacement base branch name."
    • changedInput schema / properties / body / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 65536,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / body / description
      Added value: +"Replacement Markdown pull request body."
    • changedInput schema / properties / labels_add / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "maxLength": 100,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "maxItems": 100,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / labels_add / description
      Added value: +"Labels to add."
    • changedInput schema / properties / labels_remove / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "maxLength": 100,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "maxItems": 100,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / labels_remove / description
      Added value: +"Labels to remove."
    • addedInput schema / properties / number / description
      Added value: +"Pull request number to edit."
    • addedInput schema / properties / number / minimum
      Added value: +1
    • addedInput schema / properties / owner / description
      Added value: +"GitHub repository owner or organization login."
    • addedInput schema / properties / owner / maxLength
      Added value: +39
    • addedInput schema / properties / owner / minLength
      Added value: +1
    • addedInput schema / properties / owner / pattern
      Added value: +"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$"
    • addedInput schema / properties / repo / description
      Added value: +"GitHub repository name without the owner prefix."
    • addedInput schema / properties / repo / maxLength
      Added value: +100
    • addedInput schema / properties / repo / minLength
      Added value: +1
    • addedInput schema / properties / repo / pattern
      Added value: +"^[A-Za-z0-9_.-]{1,100}$"
    • changedInput schema / properties / title / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 256,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / title / description
      Added value: +"Replacement pull request title."
    • changedOutput schema / description
      Previous value: -"Result of editing a pull request."New value: +"Authoritative outcome of one pull-request metadata edit attempt."
    • addedOutput schema / properties / precondition_checked
      Added value: +{
      +  "title": "Precondition Checked",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / readback_completed
      Added value: +{
      +  "title": "Readback Completed",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Request Id"
      +}
    • addedOutput schema / properties / state_matches_requested
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "State Matches Requested"
      +}
    • addedOutput schema / properties / warning
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Warning"
      +}
    • addedOutput schema / properties / write_completed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Write Completed"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "number",
      -  "title",
      -  "url",
      -  "message"
      -]New value: +[
      +  "precondition_checked",
      +  "write_completed",
      +  "readback_completed",
      +  "state_matches_requested",
      +  "number",
      +  "title",
      +  "url",
      +  "message"
      +]
  2. First observedv0.1.0

TDQS

A4.1/5.0
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.