Skip to main content
Glama
nikydobrev

Azure DevOps Multi-Organization MCP Server

by nikydobrev

pipelines_get_build_log_by_id

Retrieve specific build log content from Azure DevOps by providing organization, project, build ID, and log ID parameters for debugging and analysis.

Instructions

Gets the content of a specific build log file by ID

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
logIdYesID of the log to retrieve
startLineNoStarting line number for the log content, defaults to 0
endLineNoEnding line number for the log content, defaults to the end of the log

Implementation Reference

  • Handler function that retrieves the specific build log lines using the Azure DevOps Build API's getBuildLogLines method, with optional startLine and endLine parameters.
    async ({ organization, project, buildId, logId, startLine, endLine }) => {
        const connection = await connectionManager.getConnection(organization);
        const buildApi = await connection.getBuildApi();
        const logLines = await buildApi.getBuildLogLines(project, buildId, logId, startLine, endLine);
        return {
            content: [{ type: "text", text: JSON.stringify(logLines, null, 2) }],
        };
    }
  • Zod schema defining the input parameters for the tool: organization, project, buildId, logId, and optional startLine/endLine.
        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"),
        logId: z.number().describe("ID of the log to retrieve"),
        startLine: z.number().optional().describe("Starting line number for the log content, defaults to 0"),
        endLine: z.number().optional().describe("Ending line number for the log content, defaults to the end of the log"),
    },
  • Registration of the 'pipelines_get_build_log_by_id' tool using McpServer.tool(), including description, schema, and inline handler.
      "pipelines_get_build_log_by_id",
      "Gets the content of a specific build log file by ID",
      {
          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"),
          logId: z.number().describe("ID of the log to retrieve"),
          startLine: z.number().optional().describe("Starting line number for the log content, defaults to 0"),
          endLine: z.number().optional().describe("Ending line number for the log content, defaults to the end of the log"),
      },
      async ({ organization, project, buildId, logId, startLine, endLine }) => {
          const connection = await connectionManager.getConnection(organization);
          const buildApi = await connection.getBuildApi();
          const logLines = await buildApi.getBuildLogLines(project, buildId, logId, startLine, endLine);
          return {
              content: [{ type: "text", text: JSON.stringify(logLines, null, 2) }],
          };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states it 'gets' content without disclosing behavioral traits like whether it's a read-only operation, authentication requirements, rate limits, error conditions, or pagination behavior. It mentions line range defaults but doesn't explain return format or potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part of the sentence earns its place by specifying the action, resource, and key identifier.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain the return value format, error handling, or operational context, leaving significant gaps in understanding how to effectively use this tool beyond basic parameter passing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing clear documentation for all 6 parameters. The description adds no additional parameter semantics beyond implying retrieval by ID, so it meets the baseline of 3 where the schema does the heavy lifting without compensating for gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Gets') and resource ('content of a specific build log file by ID'), making the purpose unambiguous. However, it doesn't explicitly differentiate from its sibling 'pipelines_get_build_log' (which appears to get logs without specifying a log ID), missing full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'pipelines_get_build_log' or other pipeline tools. It lacks context about prerequisites, such as needing a specific build and log ID, or when line range filtering is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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