Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

build_get_definition_revisions

Retrieves a list of revisions for a specific build definition in Azure DevOps projects, enabling tracking and management of build definition changes over time.

Instructions

Retrieves a list of revisions for a specific build definition.

Input Schema

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

Implementation Reference

  • The handler function for the 'build_get_definition_revisions' tool. It connects to Azure DevOps Build API, retrieves the revisions for the specified project and definition ID, and returns the result as JSON-formatted text content.
    async ({ project, definitionId }) => {
      const connection = await connectionProvider();
      const buildApi = await connection.getBuildApi();
      const revisions = await buildApi.getDefinitionRevisions(project, definitionId);
    
      return {
        content: [{ type: "text", text: JSON.stringify(revisions, null, 2) }],
      };
    }
  • Zod input schema defining the required parameters: 'project' (string) and 'definitionId' (number) for the tool.
    {
      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"),
    },
  • MCP server tool registration call that associates the tool name 'build_get_definition_revisions' (via BUILD_TOOLS.get_definition_revisions), description, input schema, and handler function.
      BUILD_TOOLS.get_definition_revisions,
      "Retrieves a list of revisions for a specific build definition.",
      {
        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 ({ project, definitionId }) => {
        const connection = await connectionProvider();
        const buildApi = await connection.getBuildApi();
        const revisions = await buildApi.getDefinitionRevisions(project, definitionId);
    
        return {
          content: [{ type: "text", text: JSON.stringify(revisions, null, 2) }],
        };
      }
    );
  • Mapping of internal identifier 'get_definition_revisions' to the public tool name 'build_get_definition_revisions' within the BUILD_TOOLS constant used for registration.
    get_definition_revisions: "build_get_definition_revisions",
Install Server

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