Skip to main content
Glama
GitHub MCP Server

GitHub MCP Server

get_pr_files

Retrieve the list of files changed in a GitHub pull request using owner, repository, and pull request number for review or change analysis.

Instructions

Get the list of files changed in a pull request

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": {
      "owner": "<owner>",
      "repo": "<repo>",
      "pull_number": "<pull_number>"
    },
    "name": "get_pr_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name
ownerYesRepository owner
pull_numberYesPull request number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

There are no annotations, so the description must cover behavior. It doesn't say whether the list is paginated or truncated, whether renames and deletions appear, whether patches and diffs are included, how large a response is, or what the file entries contain. 'Get' implies a read with no side effects, but nothing else about the behavior is disclosed.

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

Conciseness5/5

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

A single short sentence with no wasted words, and the resource is front-loaded, so an agent can scan it quickly.

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?

For a simple read tool with three fully documented parameters, the description covers the core purpose. However, since there is no output schema and no annotations, it leaves the shape of the returned file entries and any limits on the response entirely unspecified.

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?

With 100% schema description coverage, all three parameters (owner, repo, pull_number) are already documented in the schema, and the description adds no extra meaning about their formats or constraints; baseline 3 applies.

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?

The description gives a specific verb and resource: 'Get the list of files changed in a pull request.' That is clearly a different result from get_pull_request and list_pull_requests, even though 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 Guidelines2/5

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

It says nothing about when to use this tool rather than get_pull_request, compare_commits, or get_commit, and it gives no prerequisites, such as needing a valid PR number or the states the PR can be in. Agents can only infer usage from the purpose line.

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