@azure-devops/mcp 2.2.2-nightly.20251107 → 2.2.2-nightly.20251109
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/tools/work-items.js +11 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/tools/work-items.js
CHANGED
|
@@ -480,17 +480,26 @@ function configureWorkItemTools(server, tokenProvider, connectionProvider, userA
|
|
|
480
480
|
content: [{ type: "text", text: JSON.stringify(queryDetails, null, 2) }],
|
|
481
481
|
};
|
|
482
482
|
});
|
|
483
|
-
server.tool(WORKITEM_TOOLS.get_query_results_by_id, "Retrieve the results of a work item query given the query ID.", {
|
|
483
|
+
server.tool(WORKITEM_TOOLS.get_query_results_by_id, "Retrieve the results of a work item query given the query ID. Supports full or IDs-only response types.", {
|
|
484
484
|
id: z.string().describe("The ID of the query to retrieve results for."),
|
|
485
485
|
project: z.string().optional().describe("The name or ID of the Azure DevOps project. If not provided, the default project will be used."),
|
|
486
486
|
team: z.string().optional().describe("The name or ID of the Azure DevOps team. If not provided, the default team will be used."),
|
|
487
487
|
timePrecision: z.boolean().optional().describe("Whether to include time precision in the results. Defaults to false."),
|
|
488
488
|
top: z.number().default(50).describe("The maximum number of results to return. Defaults to 50."),
|
|
489
|
-
|
|
489
|
+
responseType: z.enum(["full", "ids"]).default("full").describe("Response type: 'full' returns complete query results (default), 'ids' returns only work item IDs for reduced payload size."),
|
|
490
|
+
}, async ({ id, project, team, timePrecision, top, responseType }) => {
|
|
490
491
|
const connection = await connectionProvider();
|
|
491
492
|
const workItemApi = await connection.getWorkItemTrackingApi();
|
|
492
493
|
const teamContext = { project, team };
|
|
493
494
|
const queryResult = await workItemApi.queryById(id, teamContext, timePrecision, top);
|
|
495
|
+
// If ids mode, extract and return only the IDs
|
|
496
|
+
if (responseType === "ids") {
|
|
497
|
+
const ids = queryResult.workItems?.map((workItem) => workItem.id).filter((id) => id !== undefined) || [];
|
|
498
|
+
return {
|
|
499
|
+
content: [{ type: "text", text: JSON.stringify({ ids, count: ids.length }, null, 2) }],
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
// Default: return full query results
|
|
494
503
|
return {
|
|
495
504
|
content: [{ type: "text", text: JSON.stringify(queryResult, null, 2) }],
|
|
496
505
|
};
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "2.2.2-nightly.
|
|
1
|
+
export const packageVersion = "2.2.2-nightly.20251109";
|