testplan_show_test_results_from_build_id
Retrieve detailed test results for a specific build and project in Azure DevOps using the build ID. Simplifies test plan analysis and troubleshooting.
Instructions
Gets a list of test results for a given project and build ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buildid | Yes | The ID of the build. | |
| project | Yes | The unique identifier (ID or name) of the Azure DevOps project. |
Implementation Reference
- src/tools/testplans.ts:219-227 (handler)Handler function that connects to Azure DevOps, retrieves the TestResultsApi, and fetches test result details for the specified project and build ID using getTestResultDetailsForBuild.async ({ project, buildid }) => { const connection = await connectionProvider(); const coreApi = await connection.getTestResultsApi(); const testResults = await coreApi.getTestResultDetailsForBuild(project, buildid); return { content: [{ type: "text", text: JSON.stringify(testResults, null, 2) }], }; }
- src/tools/testplans.ts:216-218 (schema)Input schema using Zod, requiring 'project' (string) and 'buildid' (number).project: z.string().describe("The unique identifier (ID or name) of the Azure DevOps project."), buildid: z.number().describe("The ID of the build."), },
- src/tools/testplans.ts:212-228 (registration)MCP server.tool registration call that registers the tool with name Test_Plan_Tools.test_results_from_build_id ("testplan_show_test_results_from_build_id"), description, schema, and handler.server.tool( Test_Plan_Tools.test_results_from_build_id, "Gets a list of test results for a given project and build ID.", { project: z.string().describe("The unique identifier (ID or name) of the Azure DevOps project."), buildid: z.number().describe("The ID of the build."), }, async ({ project, buildid }) => { const connection = await connectionProvider(); const coreApi = await connection.getTestResultsApi(); const testResults = await coreApi.getTestResultDetailsForBuild(project, buildid); return { content: [{ type: "text", text: JSON.stringify(testResults, null, 2) }], }; } );
- src/tools/testplans.ts:14-14 (registration)Constant definition mapping internal key 'test_results_from_build_id' to public tool name 'testplan_show_test_results_from_build_id'.test_results_from_build_id: "testplan_show_test_results_from_build_id",