Skip to main content
Glama
nikydobrev

Azure DevOps Multi-Organization MCP Server

by nikydobrev

pipelines_get_build_definition_revisions

Retrieve revision history for Azure DevOps build definitions to track changes, audit modifications, and restore previous configurations.

Instructions

Gets the revision history of a build definition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationYesThe name of the Azure DevOps organization
projectYesProject ID or name to get the build definition revisions for
definitionIdYesID of the build definition to get revisions for

Implementation Reference

  • The inline handler function that executes the tool: connects to Azure DevOps, gets Build API, fetches definition revisions for the given project and definitionId, and returns JSON stringified response.
    async ({ organization, project, definitionId }) => { const connection = await connectionManager.getConnection(organization); const buildApi = await connection.getBuildApi(); const revisions = await buildApi.getDefinitionRevisions(project, definitionId); return { content: [{ type: "text", text: JSON.stringify(revisions, null, 2) }], }; }
  • Input schema using Zod for validating parameters: organization, project, definitionId.
    { organization: z.string().describe("The name of the Azure DevOps organization"), project: z.string().describe("Project ID or name to get the build definition revisions for"), definitionId: z.number().describe("ID of the build definition to get revisions for"), },
  • Registration of the tool with McpServer.tool(), including name, description, schema, and handler.
    server.tool( "pipelines_get_build_definition_revisions", "Gets the revision history of a build definition", { organization: z.string().describe("The name of the Azure DevOps organization"), project: z.string().describe("Project ID or name to get the build definition revisions for"), definitionId: z.number().describe("ID of the build definition to get revisions for"), }, async ({ organization, project, definitionId }) => { const connection = await connectionManager.getConnection(organization); const buildApi = await connection.getBuildApi(); const revisions = await buildApi.getDefinitionRevisions(project, definitionId); return { content: [{ type: "text", text: JSON.stringify(revisions, null, 2) }], }; } );

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/nikydobrev/mcp-server-azure-devops-multi'

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