Skip to main content
Glama

Get GitHub PR Details

get_github_pr
Read-onlyIdempotent

Retrieves detailed GitHub pull request information, including live PR status, and auto-detects owner/repo from the current git repository to avoid incorrect inputs.

Instructions

Get detailed information about a specific GitHub pull request, including live prStatus. IMPORTANT: Do NOT guess owner/repo values - leave them empty to auto-detect from the current git repository.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_github_pr"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoLEAVE EMPTY to auto-detect from git
ownerNoLEAVE EMPTY to auto-detect from git
pr_numberNo
use_test_dbNo
truncate_bodyNoMax characters for body text (0 = full body, default 800). Reduces token usage.

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
repoNo
errorNoHuman-readable error message
ownerNo
detailsNoAdditional error context
categoryNoError category (validation, query, connection, internal)
suggestionNoSuggested fix for the error
instructionNo
pullRequestNo
recoverableNoWhether the error is recoverable
detectedRepoNo
detectedOwnerNo
aggregated_errorsNoDetails of individual errors in a multi-step operation
requiresUserInputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv9.1.0
    • changedInput schema / properties / pr_number / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "string"
      +]
  2. First observedv9.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered. The description adds two genuinely new behavioral facts: the data is live prStatus and owner/repo can be auto-detected from the current git repo. It says nothing about authentication, rate limits, or failure modes when no git repo is present.

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 short sentences, the core purpose first and the critical auto-detect warning second, with no filler. Minor redundancy: the owner/repo auto-detect rule is repeated in the schema descriptions for both fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 not be explained, and the read-only annotations remove the need to describe side effects. However, with five parameters and only 60% schema coverage, the description leaves use_test_db and pr_number unexplained, which is a real gap for a tool an agent may call without prior context.

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 60%: repo, owner, and truncate_body carry descriptions, while pr_number and use_test_db are undocumented in both schema and description. The description reinforces the owner/repo auto-detection rule but adds no meaning for the two undocumented parameters, so the baseline of 3 is appropriate.

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 ("Get detailed information about a specific GitHub pull request") and flags the distinctive payload element ("live prStatus"). The word "specific" implicitly separates it from the sibling list tool get_github_prs, but no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a strong directive about how to fill owner/repo (leave empty to auto-detect), but that is parameter-filling guidance rather than when-to-use guidance. It never states when to call this versus get_github_prs or get_github_context, so routing between siblings is left to inference from the singular/plural names.

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

Deploy Server

Other Tools