Skip to main content
Glama

List PR changed files

pr_files
Read-onlyIdempotent

List files changed by a pull request and retrieve their patch diffs for code review.

Instructions

List files changed by a pull request with patch diffs.

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": "<repo>",
      "number": "<number>"
    },
    "name": "pr_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, starting at 1
repoYesRepository path, e.g. "owner/repo" or "group/subgroup/repo"
numberYesPR number
page_sizeNoItems per page (max 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds one genuinely useful behavioral fact beyond them: responses include patch diffs, which implies potentially large payloads. It says nothing about pagination semantics, size limits, or whether diffs can be truncated on big PRs, which is the notable omission for a read tool with page/page_size.

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?

A single front-loaded sentence with zero filler, and the key distinguishing phrase ('with patch diffs') is placed before the period. It is efficient, though borderline terse given the tool's pagination and payload characteristics.

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?

With no output schema, the description partially compensates by noting patch diffs are returned, but it does not describe the shape of results or pagination behavior for a tool that can return large, paginated payloads. For a four-parameter read tool it is adequate but leaves meaningful gaps.

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 all four parameters (repo, number, page, page_size) are already documented with types, bounds, and examples. The description adds no further meaning about parameter behavior, such as how page_size affects diff payload size. Baseline 3 applies when the schema carries the parameter burden.

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 ('List files changed by a pull request') and adds the distinguishing payload detail 'with patch diffs', so an agent knows it returns diffs rather than just filenames. It does not, however, name or contrast with siblings like pr_commits or repo_diff_compare, which is the remaining gap for a 5.

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?

There is no when-to-use guidance, no prerequisite (e.g. needing repo/number or that the PR must exist), and no mention of alternatives such as pr_commits or repo_diff_compare. The agent must infer all of this from the name and sibling list.

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