Skip to main content
Glama

get_pr_changes

Read-only

Retrieve code changes (diff) from GitHub or GitLab pull/merge requests, with optional file extension filtering to focus on specific file types.

Instructions

Get PR/MR code changes (diff) with optional file extension filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesCode hosting provider
repoYesRepository path
pr_idYesPR/MR number
hostNoGitLab host for self-hosted instances
file_extensionsNoFilter files by extensions (e.g., ['.py', '.js'])
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the description's 'Get... changes' is consistent. The description adds that it returns a diff and supports file filtering, but does not disclose behavior for errors, pagination, or performance. Some value added over annotations.

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?

Single sentence, efficient and front-loaded with the core functionality. However, it could benefit from slightly more structure or elaboration without becoming verbose.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description should explain the return format (e.g., unified diff, list of changed files). It does not. With 5 parameters and no output context, the description is incomplete for effective use.

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 has 100% coverage with descriptions for all 5 parameters. The description only reiterates the filtering capability already present in the schema. No additional semantic value provided beyond the structured schema.

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?

The description clearly states 'Get PR/MR code changes (diff)' with optional file extension filtering, specifying the exact verb and resource. It is distinct from sibling tools like get_pr_info (metadata) and add_inline_comment (commenting).

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?

No explicit guidance on when to use this tool versus alternatives such as get_pr_info or extract_related_prs. The description implies usage for viewing diffs, but does not provide contextual or exclusionary advice.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OldJii/code-review-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server