build_get_changes
Retrieve changes linked to a specific build in Azure DevOps, including source changes and paginated results, using project ID and build ID as inputs.
Instructions
Get the changes associated with a specific build.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buildId | Yes | ID of the build to get changes for | |
| continuationToken | No | Continuation token for pagination | |
| includeSourceChange | No | Whether to include source changes in the results, defaults to false | |
| project | Yes | Project ID or name to get the build changes for | |
| top | No | Number of changes to retrieve, defaults to 100 |
Implementation Reference
- src/tools/builds.ts:249-257 (handler)The main handler function for the 'build_get_changes' tool. It retrieves changes for a specific build using the Azure DevOps Build API and formats the result as JSON text content.async ({ project, buildId, continuationToken, top, includeSourceChange }) => { const connection = await connectionProvider(); const buildApi = await connection.getBuildApi(); const changes = await buildApi.getBuildChanges(project, buildId, continuationToken, top, includeSourceChange); return { content: [{ type: "text", text: JSON.stringify(changes, null, 2) }], }; }
- src/tools/builds.ts:242-248 (schema)Zod input schema validating the parameters required for the 'build_get_changes' tool: project, buildId, optional pagination and filtering options.{ project: z.string().describe("Project ID or name to get the build changes for"), buildId: z.number().describe("ID of the build to get changes for"), continuationToken: z.string().optional().describe("Continuation token for pagination"), top: z.number().default(100).describe("Number of changes to retrieve, defaults to 100"), includeSourceChange: z.boolean().optional().describe("Whether to include source changes in the results, defaults to false"), },
- src/tools/builds.ts:239-258 (registration)Registers the 'build_get_changes' tool on the MCP server using server.tool(), including name, description, input schema, and handler.server.tool( BUILD_TOOLS.get_changes, "Get the changes associated with a specific build.", { project: z.string().describe("Project ID or name to get the build changes for"), buildId: z.number().describe("ID of the build to get changes for"), continuationToken: z.string().optional().describe("Continuation token for pagination"), top: z.number().default(100).describe("Number of changes to retrieve, defaults to 100"), includeSourceChange: z.boolean().optional().describe("Whether to include source changes in the results, defaults to false"), }, async ({ project, buildId, continuationToken, top, includeSourceChange }) => { const connection = await connectionProvider(); const buildApi = await connection.getBuildApi(); const changes = await buildApi.getBuildChanges(project, buildId, continuationToken, top, includeSourceChange); return { content: [{ type: "text", text: JSON.stringify(changes, null, 2) }], }; } );
- src/tools/builds.ts:12-22 (helper)Constant object mapping internal function names to the external tool names, defining 'get_changes' as 'build_get_changes' for use in tool registration.const BUILD_TOOLS = { get_definitions: "build_get_definitions", get_definition_revisions: "build_get_definition_revisions", get_builds: "build_get_builds", get_log: "build_get_log", get_log_by_id: "build_get_log_by_id", get_changes: "build_get_changes", run_build: "build_run_build", get_status: "build_get_status", update_build_stage: "build_update_build_stage", };
- src/tools.ts:22-22 (registration)Top-level call to configureBuildTools within configureAllTools, which registers all build tools including 'build_get_changes'.configureBuildTools(server, tokenProvider, connectionProvider, userAgentProvider);