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
| Name | Required | Description | Default |
|---|---|---|---|
| definitionId | Yes | ID of the build definition to get revisions for | |
| project | Yes | Project ID or name to get the build definition revisions for |
Implementation Reference
- src/tools/builds.ts:104-112 (handler)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) }], }; }
- src/tools/builds.ts:100-103 (schema)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"), },
- src/tools/builds.ts:98-113 (registration)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) }], }; } );
- src/tools/builds.ts:14-14 (registration)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",