@azure-devops/mcp 2.2.2-nightly.20251106 → 2.2.2-nightly.20251107

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.
@@ -81,20 +81,39 @@ function configureWorkTools(server, _, connectionProvider) {
81
81
  server.tool(WORK_TOOLS.list_iterations, "List all iterations in a specified Azure DevOps project.", {
82
82
  project: z.string().describe("The name or ID of the Azure DevOps project."),
83
83
  depth: z.number().default(2).describe("Depth of children to fetch."),
84
- }, async ({ project, depth }) => {
84
+ excludedIds: z.array(z.number()).optional().describe("An optional array of iteration IDs, and thier children, that should not be returned."),
85
+ }, async ({ project, depth, excludedIds: ids }) => {
85
86
  try {
86
87
  const connection = await connectionProvider();
87
88
  const workItemTrackingApi = await connection.getWorkItemTrackingApi();
89
+ let results = [];
88
90
  if (depth === undefined) {
89
91
  depth = 1;
90
92
  }
91
- const results = await workItemTrackingApi.getClassificationNodes(project, [], depth);
93
+ results = await workItemTrackingApi.getClassificationNodes(project, [], depth);
92
94
  // Handle null or undefined results
93
95
  if (!results) {
94
96
  return { content: [{ type: "text", text: "No iterations were found" }], isError: true };
95
97
  }
96
98
  // Filter out items with structureType=0 (Area nodes), only keep structureType=1 (Iteration nodes)
97
- const filteredResults = results.filter((node) => node.structureType === TreeNodeStructureType.Iteration);
99
+ let filteredResults = results.filter((node) => node.structureType === TreeNodeStructureType.Iteration);
100
+ // If specific IDs are provided, filter them out recursively (exclude matching nodes and their children)
101
+ if (ids && ids.length > 0) {
102
+ const filterOutIds = (nodes) => {
103
+ return nodes
104
+ .filter((node) => !node.id || !ids.includes(node.id))
105
+ .map((node) => {
106
+ if (node.children && node.children.length > 0) {
107
+ return {
108
+ ...node,
109
+ children: filterOutIds(node.children),
110
+ };
111
+ }
112
+ return node;
113
+ });
114
+ };
115
+ filteredResults = filterOutIds(filteredResults);
116
+ }
98
117
  if (filteredResults.length === 0) {
99
118
  return { content: [{ type: "text", text: "No iterations were found" }], isError: true };
100
119
  }
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const packageVersion = "2.2.2-nightly.20251106";
1
+ export const packageVersion = "2.2.2-nightly.20251107";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-devops/mcp",
3
- "version": "2.2.2-nightly.20251106",
3
+ "version": "2.2.2-nightly.20251107",
4
4
  "description": "MCP server for interacting with Azure DevOps",
5
5
  "license": "MIT",
6
6
  "author": "Microsoft Corporation",