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.
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": {
"pr_url_or_id": "<pr_url_or_id>",
"file_paths": "<file_paths>",
"exclude_extensions": "<exclude_extensions>",
"working_directory": "<working_directory>"
},
"name": "get_pr_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr_url_or_id | Yes | ||
| file_paths | Yes | ||
| exclude_extensions | Yes | ||
| working_directory | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |