Skip to main content
Glama

get_pr_file_contents

Retrieve the contents of files changed in a pull request. Optionally filter by file paths or exclude specific extensions.

Instructions

Fetch file contents for files changed in a PR.

Returns a list of dicts, each with keys: path, content, encoding, size_bytes. Files that fail to fetch are omitted from successes and included as error entries with ai_guidance.

If file_paths is None, fetches all changed files.

Args: pr_url_or_id: A full PR URL or numeric PR ID. file_paths: Optional list of specific file paths to fetch. exclude_extensions: Optional list of file extensions to skip (e.g. [".png", ".lock"]). Case-insensitive; leading dot optional. working_directory: Optional path for context resolution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pr_url_or_idYes
file_pathsYes
exclude_extensionsYes
working_directoryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses return format (list of dicts with keys), error handling (omitted from successes, included as error entries with ai_guidance), and behavior when file_paths is None. Lacks details on auth or rate limits but covers core behavioral traits.

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?

Description is well-structured with a short summary line, then return format, then a note about behavior, then a clear Args list. Every sentence adds value; no redundancy.

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?

Given no annotations and an output schema (though not shown), the description covers return format, error handling, and all parameters. It is complete for an agent to understand usage and behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description must add meaning. It explains each parameter clearly: pr_url_or_id (full URL or numeric ID), file_paths (optional list), exclude_extensions (optional, case-insensitive, leading dot optional), working_directory (optional). This fully compensates for the missing schema 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?

Description clearly states 'Fetch file contents for files changed in a PR.' with specific verb and resource. It distinguishes from sibling tools like get_pr_file_changes (which likely only lists changes) and get_repo_file_content (which fetches a single file).

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?

Description explains optional filtering (file_paths, exclude_extensions) and default behavior when file_paths is None, but does not compare to alternative tools or provide explicit when-not-to-use guidance.

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/grimlor/ado-workflows-mcp'

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