@azure-devops/mcp 2.4.0-nightly.20260309 → 2.4.0-nightly.20260311
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/README.md +1 -1
- package/dist/tools/work-items.js +39 -0
- package/dist/tools/work.js +37 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ See [TOOLSET.md](./docs/TOOLSET.md) for a comprehensive list.
|
|
|
46
46
|
|
|
47
47
|
## 🔌 Installation & Getting Started
|
|
48
48
|
|
|
49
|
-
For the best experience, use Visual Studio Code and GitHub Copilot. See the [getting started documentation](./docs/GETTINGSTARTED.md) to use our MCP Server with other tools such as Visual Studio 2022, Claude Code, and
|
|
49
|
+
For the best experience, use Visual Studio Code and GitHub Copilot. See the [getting started documentation](./docs/GETTINGSTARTED.md) to use our MCP Server with other tools such as Visual Studio 2022, Claude Code, Cursor, Opencode, and Kilocode.
|
|
50
50
|
|
|
51
51
|
### Prerequisites
|
|
52
52
|
|
package/dist/tools/work-items.js
CHANGED
|
@@ -16,6 +16,7 @@ const WORKITEM_TOOLS = {
|
|
|
16
16
|
list_work_item_revisions: "wit_list_work_item_revisions",
|
|
17
17
|
get_work_items_for_iteration: "wit_get_work_items_for_iteration",
|
|
18
18
|
add_work_item_comment: "wit_add_work_item_comment",
|
|
19
|
+
update_work_item_comment: "wit_update_work_item_comment",
|
|
19
20
|
add_child_work_items: "wit_add_child_work_items",
|
|
20
21
|
link_work_item_to_pull_request: "wit_link_work_item_to_pull_request",
|
|
21
22
|
get_work_item_type: "wit_get_work_item_type",
|
|
@@ -259,6 +260,44 @@ function configureWorkItemTools(server, tokenProvider, connectionProvider, userA
|
|
|
259
260
|
};
|
|
260
261
|
}
|
|
261
262
|
});
|
|
263
|
+
server.tool(WORKITEM_TOOLS.update_work_item_comment, "Update an existing comment on a work item by ID.", {
|
|
264
|
+
project: z.string().describe("The name or ID of the Azure DevOps project."),
|
|
265
|
+
workItemId: z.number().describe("The ID of the work item."),
|
|
266
|
+
commentId: z.number().describe("The ID of the comment to update."),
|
|
267
|
+
text: z.string().describe("The updated comment text."),
|
|
268
|
+
format: z.enum(["markdown", "html"]).optional().default("html"),
|
|
269
|
+
}, async ({ project, workItemId, commentId, text, format }) => {
|
|
270
|
+
try {
|
|
271
|
+
const connection = await connectionProvider();
|
|
272
|
+
const orgUrl = connection.serverUrl;
|
|
273
|
+
const accessToken = await tokenProvider();
|
|
274
|
+
const body = { text };
|
|
275
|
+
const formatParameter = format === "markdown" ? 0 : 1;
|
|
276
|
+
const response = await fetch(`${orgUrl}/${project}/_apis/wit/workItems/${workItemId}/comments/${commentId}?format=${formatParameter}&api-version=${markdownCommentsApiVersion}`, {
|
|
277
|
+
method: "PATCH",
|
|
278
|
+
headers: {
|
|
279
|
+
"Authorization": `Bearer ${accessToken}`,
|
|
280
|
+
"Content-Type": "application/json",
|
|
281
|
+
"User-Agent": userAgentProvider(),
|
|
282
|
+
},
|
|
283
|
+
body: JSON.stringify(body),
|
|
284
|
+
});
|
|
285
|
+
if (!response.ok) {
|
|
286
|
+
throw new Error(`Failed to update work item comment: ${response.statusText}`);
|
|
287
|
+
}
|
|
288
|
+
const updatedComment = await response.text();
|
|
289
|
+
return {
|
|
290
|
+
content: [{ type: "text", text: updatedComment }],
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
|
|
295
|
+
return {
|
|
296
|
+
content: [{ type: "text", text: `Error updating work item comment: ${errorMessage}` }],
|
|
297
|
+
isError: true,
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
});
|
|
262
301
|
server.tool(WORKITEM_TOOLS.list_work_item_revisions, "Retrieve list of revisions for a work item by ID.", {
|
|
263
302
|
project: z.string().describe("The name or ID of the Azure DevOps project."),
|
|
264
303
|
workItemId: z.number().describe("The ID of the work item to retrieve revisions for."),
|
package/dist/tools/work.js
CHANGED
|
@@ -10,6 +10,7 @@ const WORK_TOOLS = {
|
|
|
10
10
|
get_team_capacity: "work_get_team_capacity",
|
|
11
11
|
update_team_capacity: "work_update_team_capacity",
|
|
12
12
|
get_iteration_capacities: "work_get_iteration_capacities",
|
|
13
|
+
get_team_settings: "work_get_team_settings",
|
|
13
14
|
};
|
|
14
15
|
function configureWorkTools(server, _, connectionProvider) {
|
|
15
16
|
server.tool(WORK_TOOLS.list_team_iterations, "Retrieve a list of iterations for a specific team in a project.", {
|
|
@@ -294,5 +295,41 @@ function configureWorkTools(server, _, connectionProvider) {
|
|
|
294
295
|
};
|
|
295
296
|
}
|
|
296
297
|
});
|
|
298
|
+
server.tool(WORK_TOOLS.get_team_settings, "Get team settings including default iteration, backlog iteration, and default area path for a team.", {
|
|
299
|
+
project: z.string().describe("The name or ID of the Azure DevOps project."),
|
|
300
|
+
team: z.string().optional().describe("The name or ID of the Azure DevOps team. If not provided, the default team will be used."),
|
|
301
|
+
}, async ({ project, team }) => {
|
|
302
|
+
try {
|
|
303
|
+
const connection = await connectionProvider();
|
|
304
|
+
const workApi = await connection.getWorkApi();
|
|
305
|
+
const teamContext = { project, team };
|
|
306
|
+
const teamSettings = await workApi.getTeamSettings(teamContext);
|
|
307
|
+
if (!teamSettings) {
|
|
308
|
+
return { content: [{ type: "text", text: "No team settings found" }], isError: true };
|
|
309
|
+
}
|
|
310
|
+
const teamFieldValues = await workApi.getTeamFieldValues(teamContext);
|
|
311
|
+
const result = {
|
|
312
|
+
backlogIteration: teamSettings.backlogIteration,
|
|
313
|
+
defaultIteration: teamSettings.defaultIteration,
|
|
314
|
+
defaultIterationMacro: teamSettings.defaultIterationMacro,
|
|
315
|
+
backlogVisibilities: teamSettings.backlogVisibilities,
|
|
316
|
+
bugsBehavior: teamSettings.bugsBehavior,
|
|
317
|
+
workingDays: teamSettings.workingDays,
|
|
318
|
+
defaultAreaPath: teamFieldValues?.defaultValue,
|
|
319
|
+
areaPathField: teamFieldValues?.field,
|
|
320
|
+
areaPaths: teamFieldValues?.values,
|
|
321
|
+
};
|
|
322
|
+
return {
|
|
323
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
catch (error) {
|
|
327
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
|
|
328
|
+
return {
|
|
329
|
+
content: [{ type: "text", text: `Error fetching team settings: ${errorMessage}` }],
|
|
330
|
+
isError: true,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
});
|
|
297
334
|
}
|
|
298
335
|
export { WORK_TOOLS, configureWorkTools };
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "2.4.0-nightly.
|
|
1
|
+
export const packageVersion = "2.4.0-nightly.20260311";
|