Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

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
NameRequiredDescriptionDefault
buildIdYesID of the build to get changes for
continuationTokenNoContinuation token for pagination
includeSourceChangeNoWhether to include source changes in the results, defaults to false
projectYesProject ID or name to get the build changes for
topNoNumber of changes to retrieve, defaults to 100

Implementation Reference

  • 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) }], }; }
  • 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"), },
  • 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) }], }; } );
  • 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);

Other Tools

Related 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/ennuiii/DevOpsMcpPAT'

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