Skip to main content
Glama
GitHub PR Issue Analyser

GitHub PR Issue Analyser

by saidsef

Github Update Pr

github_update_pr
Idempotent

Update an existing pull request by changing only the fields you supply, such as title, body, base branch, state, or labels, while preserving all other current values.

Instructions

Updates an existing pull request. Only the fields supplied are sent, the rest keep their current values, so a title can change without restating the body. Labels take a second call, since the pull request endpoint does not take them. That call answers with the issue, which has no head, base or reviewers, so a labels-only update reads the pull request back.

Workflow and conventions: github_get_skill('pr-management').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo_owner": "<repo_owner>",
      "repo_name": "<repo_name>",
      "pr_number": "<pr_number>"
    },
    "name": "github_update_pr"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoBranch to retarget the pull request onto
bodyNoReplacement body in Markdown. Omit to leave the current body alone
stateNoOmit to leave the state alone
titleNoReplacement title. Omit to leave the current title alone
labelsNoReplacement label set. Omit to keep the current labels, pass [] to strip them all. The 'mcp' tracking label is not re-added here
pr_numberYes
repo_nameYes
repo_ownerYes

Output Schema

NameRequiredDescriptionDefault
stateYes
titleYes
authorYes
labelsYes
mergedYes
commitsYes
base_refYes
head_refYes
head_shaYes
is_draftYes
additionsYes
assigneesYes
deletionsYes
mergeableYes
created_atYes
updated_atYes
descriptionYes
changed_filesYes
mergeable_stateYes
requested_teamsYes
requested_reviewersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv55.0.0
    • addedOutput schema / properties / assignees
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / labels
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "title",
      -  "description",
      -  "author",
      -  "created_at",
      -  "updated_at",
      -  "state",
      -  "is_draft",
      -  "merged",
      -  "mergeable",
      -  "mergeable_state",
      -  "head_sha",
      -  "head_ref",
      -  "base_ref",
      -  "requested_reviewers",
      -  "requested_teams",
      -  "commits",
      -  "additions",
      -  "deletions",
      -  "changed_files"
      -]New value: +[
      +  "title",
      +  "description",
      +  "author",
      +  "created_at",
      +  "updated_at",
      +  "state",
      +  "is_draft",
      +  "merged",
      +  "mergeable",
      +  "mergeable_state",
      +  "head_sha",
      +  "head_ref",
      +  "base_ref",
      +  "requested_reviewers",
      +  "requested_teams",
      +  "labels",
      +  "assignees",
      +  "commits",
      +  "additions",
      +  "deletions",
      +  "changed_files"
      +]
  2. Changed9 schema fields changedv54.0.0
    • addedOutput schema / properties / additions
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / changed_files
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / commits
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / deletions
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / is_draft
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / mergeable
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / mergeable_state
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / merged
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "title",
      -  "description",
      -  "author",
      -  "created_at",
      -  "updated_at",
      -  "state",
      -  "head_sha",
      -  "head_ref",
      -  "base_ref",
      -  "requested_reviewers",
      -  "requested_teams"
      -]New value: +[
      +  "title",
      +  "description",
      +  "author",
      +  "created_at",
      +  "updated_at",
      +  "state",
      +  "is_draft",
      +  "merged",
      +  "mergeable",
      +  "mergeable_state",
      +  "head_sha",
      +  "head_ref",
      +  "base_ref",
      +  "requested_reviewers",
      +  "requested_teams",
      +  "commits",
      +  "additions",
      +  "deletions",
      +  "changed_files"
      +]
  3. Changed1 schema field changedv42.1.1
    • changedInput schema / properties / labels / description
      Previous value: -"Replacement label set. Omit to keep the current labels, pass [] to strip them all"New value: +"Replacement label set. Omit to keep the current labels, pass [] to strip them all. The 'mcp' tracking label is not re-added here"
  4. Addedv42.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare idempotent, non-read-only, non-destructive, so the bar is lower, but the description still contributes the non-obvious multi-call behavior: labels route through the issue endpoint and a labels-only update triggers a read-back of the PR. It does not discuss auth requirements, rate limits, or what happens on invalid state transitions.

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?

Front-loads the core action, then explains partial-update semantics and the labels edge case in three tight sentences, closing with the skill pointer. Dense but every sentence carries information an agent would otherwise get wrong.

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?

An output schema exists so return values need no prose, and the trickiest behavior (partial update, labels second call, read-back) is covered. Missing pieces are minor: no mention of error handling or the semantics of repo/pr identifiers.

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?

Adds real meaning beyond the schema: supplied fields are sent and the rest are left untouched, and labels are not part of the PR endpoint so they require a follow-up issue call whose response lacks head/base/reviewers. The three required identifiers (repo_owner, repo_name, pr_number) are never explained, which is the main gap at 63% coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Updates an existing pull request') and scopes the updatable fields. It implicitly separates itself from close relatives like github_update_pr_branch or github_set_pr_draft by noting that head/base/state are handled here and that labels go through a separate call, but it never names a sibling tool explicitly.

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?

Makes clear this is for modifying an existing PR's title, body, base, state, or labels, and points at github_get_skill('pr-management') for workflow conventions. It does not state when to prefer a sibling instead (e.g. github_update_pr_branch for branch merges), so the guidance is contextual rather than exclusionary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.