@azure-devops/mcp 2.4.0-nightly.20260317 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/auth.js CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/logger.js CHANGED
File without changes
File without changes
package/dist/prompts.js CHANGED
File without changes
@@ -275,16 +275,48 @@ function configureTestPlanTools(server, _, connectionProvider) {
275
275
  };
276
276
  }
277
277
  });
278
- server.tool(Test_Plan_Tools.test_results_from_build_id, "Gets a list of test results for a given project and build ID.", {
278
+ server.tool(Test_Plan_Tools.test_results_from_build_id, "Gets a list of test results for a given project and build ID. Can filter by test outcome (e.g. Failed, Passed, Aborted). Returns test case titles, error messages, stack traces, and outcomes. Efficiently handles builds with large numbers of test runs.", {
279
279
  project: z.string().describe("The unique identifier (ID or name) of the Azure DevOps project."),
280
280
  buildid: z.number().describe("The ID of the build."),
281
- }, async ({ project, buildid }) => {
281
+ outcomes: z.array(z.string()).optional().describe("Filter results by test outcome, e.g. ['Failed', 'Passed', 'Aborted']."),
282
+ }, async ({ project, buildid, outcomes }) => {
282
283
  try {
283
284
  const connection = await connectionProvider();
284
- const coreApi = await connection.getTestResultsApi();
285
- const testResults = await coreApi.getTestResultDetailsForBuild(project, buildid);
285
+ const testResultsApi = await connection.getTestResultsApi();
286
+ // Build filter expression for outcomes if specified
287
+ const outcomeFilter = outcomes?.map((o) => `Outcome eq '${o}'`).join(" or ");
288
+ // Fetch test result details for the build in a single API call
289
+ // This is more efficient than getTestRuns + getTestResults per run,
290
+ // especially for builds with many test runs (e.g., cloud testing with one run per test case)
291
+ const testResultDetails = await testResultsApi.getTestResultDetailsForBuild(project, buildid, undefined, // publishContext
292
+ undefined, // groupBy
293
+ outcomeFilter, // filter by outcome
294
+ undefined, // orderby
295
+ true // shouldIncludeResults - get individual test results, not just aggregates
296
+ );
297
+ // Extract individual test results from the grouped response
298
+ const allResults = [];
299
+ if (testResultDetails.resultsForGroup) {
300
+ for (const group of testResultDetails.resultsForGroup) {
301
+ if (group.results) {
302
+ allResults.push(...group.results);
303
+ }
304
+ }
305
+ }
306
+ // Format results to extract useful fields
307
+ const formattedResults = allResults.map((r) => ({
308
+ id: r.id,
309
+ testCaseTitle: r.testCaseTitle,
310
+ outcome: r.outcome,
311
+ errorMessage: r.errorMessage,
312
+ stackTrace: r.stackTrace,
313
+ automatedTestName: r.automatedTestName,
314
+ automatedTestStorage: r.automatedTestStorage,
315
+ durationInMs: r.durationInMs,
316
+ runId: r.testRun?.id,
317
+ }));
286
318
  return {
287
- content: [{ type: "text", text: JSON.stringify(testResults, null, 2) }],
319
+ content: [{ type: "text", text: JSON.stringify(formattedResults, null, 2) }],
288
320
  };
289
321
  }
290
322
  catch (error) {
package/dist/tools.js CHANGED
File without changes
package/dist/useragent.js CHANGED
File without changes
package/dist/utils.js CHANGED
File without changes
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const packageVersion = "2.4.0-nightly.20260317";
1
+ export const packageVersion = "2.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-devops/mcp",
3
- "version": "2.4.0-nightly.20260317",
3
+ "version": "2.5.0",
4
4
  "mcpName": "microsoft.com/azure-devops",
5
5
  "description": "MCP server for interacting with Azure DevOps",
6
6
  "license": "MIT",