Skip to main content
Glama
Azure DevOps MCP Server

Azure DevOps MCP Server

get_build_test_results

Read-onlyIdempotent

Retrieve test run summaries and test results for a pipeline run by run ID or pipeline name plus build number, defaulting to failed, aborted, timeout, and error tests.

Instructions

Retrieve test run summaries and test results (defaulting to failed/aborted/timeout/error tests with error messages and stack traces) for a pipeline run. The run can be identified by runId or by pipelineName (or pipelineId) plus buildNumber.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_build_test_results"
  }
}

Input Schema

NameRequiredDescriptionDefault
skipNoOptional number of test results to skip per test run for pagination (default 0).
runIdNoPipeline run (build) ID. Alternatively provide buildNumber together with pipelineName or pipelineId
topRunsNoMaximum number of test runs to inspect for the build (1-200, default 50).
outcomesNoTest outcome filter: array of TestOutcome names (e.g. ["Failed", "Aborted", "Timeout", "Error"], ["Passed"]), numeric outcome codes (0-14), or "all". Defaults to failure-focused outcomes: ["Failed", "Aborted", "Timeout", "Error"].
projectIdNoThe ID or name of the project (defaults to AZURE_DEVOPS_DEFAULT_PROJECT)
maxResultsNoMaximum total test results returned across all test runs for this build (1-1000, default 100). Per-run API $top is capped at 200 when detailsToInclude is not "None" and 1000 otherwise.
pipelineIdNoOptional pipeline numeric ID; scopes buildNumber lookups
buildNumberNoBuild number / run name as shown in the Azure DevOps UI (e.g. "20240115.3"). Alternative to runId; combine with pipelineName or pipelineId to make it unambiguous.
pipelineNameNoPipeline (build definition) name, as shown in the Azure DevOps UI. Alternative to pipelineId. Prefix it with its folder path to disambiguate pipelines that share a name (e.g. "Backend/Deploy"; "/Deploy" for the root folder).
detailsToIncludeNoOptional detail level per test result ("None", "Iterations", "WorkItems", "SubResults", "Point"). Defaults to "None". Non-None values cap per-run API $top to 200.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.13

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the default outcome set is failure-focused (Failed/Aborted/Timeout/Error) and results include error messages and stack traces, which tells the agent what it will actually see. Pagination and result caps are left to the schema.

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?

Two sentences, zero filler. The default return behavior is front-loaded in parentheses and the run-identification rules follow immediately, which is exactly the order an agent needs.

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

Completeness4/5

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

For a 10-parameter, zero-required read tool with no output schema, the description covers the two things an agent must know: how to identify the run and what the default result set contains. Minor gaps remain around pagination behavior and the per-run vs. total result caps, but those are spelled out in the schema.

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%, so every one of the 10 parameters is already documented, including the runId vs. buildNumber+pipeline alternative and the outcome defaults. The description restates those relationships at a high level without adding syntax or edge-case guidance beyond the schema, so the baseline of 3 applies.

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 uses a specific verb and resource ('Retrieve test run summaries and test results ... for a pipeline run') and even specifies the default filter. It is unambiguous about what is returned, but it never names or contrasts itself with any sibling (e.g. get_pipeline_run or get_test_plan), so an agent must infer the boundary itself.

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

Usage Guidelines3/5

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

Usage is only implied: you call it when you need test results for a known pipeline run. The second sentence gives concrete identification paths (runId, or pipelineName/pipelineId plus buildNumber), which is helpful routing within the call, but there is no explicit statement of when to prefer this over the pipeline-run or test-plan tools.

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