Skip to main content
Glama
nikydobrev

Azure DevOps Multi-Organization MCP Server

by nikydobrev

pipelines_get_build_log

Retrieve build log files from Azure DevOps to analyze pipeline execution details and troubleshoot issues.

Instructions

Gets the list of log files for a build

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationYesThe name of the Azure DevOps organization
projectYesProject ID or name to get the build log for
buildIdYesID of the build to get the log for

Implementation Reference

  • The handler function that fetches the list of build logs for the specified build using the Azure DevOps Build API and returns them as a JSON string in the tool response.
    async ({ organization, project, buildId }) => { const connection = await connectionManager.getConnection(organization); const buildApi = await connection.getBuildApi(); const logs = await buildApi.getBuildLogs(project, buildId); return { content: [{ type: "text", text: JSON.stringify(logs, null, 2) }], }; }
  • Zod schema defining the input parameters for the tool: organization (string), project (string), buildId (number).
    { organization: z.string().describe("The name of the Azure DevOps organization"), project: z.string().describe("Project ID or name to get the build log for"), buildId: z.number().describe("ID of the build to get the log for"), },
  • Registration of the 'pipelines_get_build_log' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool( "pipelines_get_build_log", "Gets the list of log files for a build", { organization: z.string().describe("The name of the Azure DevOps organization"), project: z.string().describe("Project ID or name to get the build log for"), buildId: z.number().describe("ID of the build to get the log for"), }, async ({ organization, project, buildId }) => { const connection = await connectionManager.getConnection(organization); const buildApi = await connection.getBuildApi(); const logs = await buildApi.getBuildLogs(project, buildId); return { content: [{ type: "text", text: JSON.stringify(logs, 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