Skip to main content
Glama

Reopen a GitHub pull request

github_pr_reopen
DestructiveIdempotent

Reopen a closed pull request and optionally post a comment as it reopens, notifying followers. Merged pull requests cannot be reopened; already-open ones are left unchanged.

Instructions

Reopen a closed pull request; the comment, if any, is posted as it reopens, and the people following the pull request are notified. A merged pull request cannot be reopened. A pull request that is open already is left as it is: nothing is sent, the comment is not posted and changed is false. A pull request is 12, #12, owner/repo#12 or its URL; a bare number means the working tree's repository, or repo.

Input Schema

NameRequiredDescriptionDefault
prYesThe pull request, as 12, #12, owner/repo#12 or its URL.
repoNoowner/name; defaults to the working tree's repository (its origin). Used for a bare number.
commentNoA comment to post as the pull request reopens.

Output Schema

NameRequiredDescriptionDefault
prYes
urlYes
repoYes
stateYesThe pull request's state now: open.
changedYesFalse when the pull request was open already and nothing was sent.
foreignYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing social side effects (followers are notified), the conditional comment-posting behavior, and the exact no-op contract when the PR is already open, including the returned changed=false signal. Annotations already flag destructiveHint=true and idempotentHint=true, and the description's stated behavior is consistent with both.

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?

Four sentences, each carrying distinct information: effect, merged exclusion, already-open no-op, and accepted identifier formats. Slightly dense but front-loaded and free of filler; the changed=false detail edges into return-value territory already covered by the output schema.

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?

For a 3-parameter mutation with full schema coverage, full annotation coverage, and an output schema, this covers everything an agent needs: preconditions, side effects, identifier formats, and no-op semantics. Nothing material is missing.

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 baseline is 3. The description does add the disambiguation that a bare number resolves against the working tree's repository or the repo argument, but this largely restates the schema's own pr and repo descriptions.

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?

Opens with a specific verb+resource ("Reopen a closed pull request") that immediately separates it from github_pr_close, github_issue_reopen, and the other siblings. The scope qualifier "closed" and the merged-PR exclusion sharpen the purpose further.

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?

Gives concrete conditions for what happens in each state: merged PRs cannot be reopened, already-open PRs are a no-op. It stops short of naming a sibling alternative (e.g. use github_pr_create / check github_pr_read first), so it is clear context rather than explicit routing.

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