Summary
Add a simple, focused tool to list the files changed in a pull request — returning only file paths and change types (add, edit, delete, rename). This is intentionally lightweight: no diffs, no file content, just metadata.
This fills a gap between mcp_ado_repo_get_pull_request_by_id (which returns PR metadata but not changed files) and the heavier diff-oriented approach in #868 / PR #801 (which fetches full diffs and file content).
Use Cases
- Scoping PR reviews: Agents can quickly see which files changed before deciding what to analyze in depth
- Routing and triage: Determine affected areas (e.g., "does this PR touch tests? docs? config?") without fetching diffs
- Composability: Pair with existing tools like
repo_search_commits or repo_list_pull_request_threads for richer workflows without overwhelming the context window
Current workarounds are insufficient
Existing tools like get_build_changes, search_commits, and list_pull_request_threads can approximate a file list, but none provide a clean "list of files changed in this PR" the way the ADO UI does. The dedicated API endpoint (/pullRequests/{id}/iterations/{id}/changes) exists but isn't exposed as a tool.
Prior Discussion
Tools
Develop the following tool with full parameter support, including optional ones:
repo_get_pull_request_changed_files: Get files changed in a pull request
Returns file paths and change types only (no diff content).
Endpoint: GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes?api-version=7.1
Parameters:
repositoryId (required): The ID of the repository
pullRequestId (required): The ID of the pull request
project (optional): Project ID or project name
iterationId (optional): Iteration ID to get changes for. If not specified, fetches the latest iteration automatically
top (optional): Maximum number of changes to return
skip (optional): Number of changes to skip for pagination
compareTo (optional): Iteration ID to compare against
The tool should internally resolve the latest iteration (via GET .../pullRequests/{id}/iterations) when iterationId is not provided and return only the file-level metadata (path, original path, change type) from the response — stripping diff blocks and file content.
Summary
Add a simple, focused tool to list the files changed in a pull request — returning only file paths and change types (add, edit, delete, rename). This is intentionally lightweight: no diffs, no file content, just metadata.
This fills a gap between
mcp_ado_repo_get_pull_request_by_id(which returns PR metadata but not changed files) and the heavier diff-oriented approach in #868 / PR #801 (which fetches full diffs and file content).Use Cases
repo_search_commitsorrepo_list_pull_request_threadsfor richer workflows without overwhelming the context windowCurrent workarounds are insufficient
Existing tools like
get_build_changes,search_commits, andlist_pull_request_threadscan approximate a file list, but none provide a clean "list of files changed in this PR" the way the ADO UI does. The dedicated API endpoint (/pullRequests/{id}/iterations/{id}/changes) exists but isn't exposed as a tool.Prior Discussion
Tools
Develop the following tool with full parameter support, including optional ones:
repo_get_pull_request_changed_files: Get files changed in a pull requestReturns file paths and change types only (no diff content).
Endpoint: GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes?api-version=7.1
Parameters:
repositoryId(required): The ID of the repositorypullRequestId(required): The ID of the pull requestproject(optional): Project ID or project nameiterationId(optional): Iteration ID to get changes for. If not specified, fetches the latest iteration automaticallytop(optional): Maximum number of changes to returnskip(optional): Number of changes to skip for paginationcompareTo(optional): Iteration ID to compare againstThe tool should internally resolve the latest iteration (via GET
.../pullRequests/{id}/iterations) wheniterationIdis not provided and return only the file-level metadata (path, original path, change type) from the response — stripping diff blocks and file content.