@achieveai/azuredevops-mcp 1.3.12 → 1.3.14

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/index.js CHANGED
@@ -291,7 +291,7 @@ async function main() {
291
291
  fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Specific fields to return (e.g., ['System.Title', 'System.State'])"),
292
292
  }, async (params) => {
293
293
  const result = await workItemTools.getWorkItemsBatch(params);
294
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
294
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
295
295
  });
296
296
  allowedTools.has("getWorkItemRevisions") && server.tool("getWorkItemRevisions", "Get revision/change history for a work item showing all field changes over time", {
297
297
  id: zId().describe("Work item ID"),
@@ -299,13 +299,13 @@ async function main() {
299
299
  skip: zod_1.z.coerce.number().optional().describe("Number of revisions to skip"),
300
300
  }, async (params) => {
301
301
  const result = await workItemTools.getWorkItemRevisions(params);
302
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
302
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
303
303
  });
304
304
  allowedTools.has("getQueryResults") && server.tool("getQueryResults", "Execute a saved WIQL query by its query ID and return the resulting work items", {
305
305
  queryId: zod_1.z.string().describe("The GUID of the saved query to execute"),
306
306
  }, async (params) => {
307
307
  const result = await workItemTools.getQueryResults(params);
308
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
308
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
309
309
  });
310
310
  allowedTools.has("addChildWorkItem") && server.tool("addChildWorkItem", "Create a new work item and link it as a child of an existing parent work item", {
311
311
  parentId: zId().describe("Parent work item ID"),
@@ -319,14 +319,14 @@ async function main() {
319
319
  additionalFields: zod_1.z.record(zod_1.z.any()).optional().describe("Additional fields"),
320
320
  }, async (params) => {
321
321
  const result = await workItemTools.addChildWorkItem(params);
322
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
322
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
323
323
  });
324
324
  allowedTools.has("unlinkWorkItem") && server.tool("unlinkWorkItem", "Remove a link/relation from a work item by its relation index. Use getWorkItemById first to see the relations and their indices.", {
325
325
  id: zId().describe("Work item ID"),
326
326
  relationIndex: zod_1.z.coerce.number().describe("Index of the relation to remove (0-based, from the relations array)"),
327
327
  }, async (params) => {
328
328
  const result = await workItemTools.unlinkWorkItem(params);
329
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
329
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
330
330
  });
331
331
  // Register Boards & Sprints Tools
332
332
  allowedTools.has("getBoards") && server.tool("getBoards", "Get all boards for a team", {
@@ -770,7 +770,8 @@ async function main() {
770
770
  endLine: zod_1.z.coerce.number().optional().describe("Optional 1-based end line number for multi-line range comments. If omitted, the comment targets a single line."),
771
771
  endOffset: zod_1.z.coerce.number().optional().describe("Optional character offset within the end line. Required when endLine is provided. Typically use 1 for end of selection.")
772
772
  }).describe("The position within the file where the comment will be anchored. Use line/offset for single-line comments, add endLine/endOffset for multi-line range comments."),
773
- path: zod_1.z.string().describe("The full path to the file within the repository that the comment relates to. Must be a file changed in the PR (e.g., '/src/Services/UserService.cs').")
773
+ path: zod_1.z.string().describe("The full path to the file within the repository that the comment relates to. Must be a file changed in the PR (e.g., '/src/Services/UserService.cs')."),
774
+ format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering.")
774
775
  }, async (params, extra) => {
775
776
  const result = await gitTools.addPullRequestInlineComment(params);
776
777
  return {
@@ -783,7 +784,8 @@ async function main() {
783
784
  repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
784
785
  pullRequestId: zId().describe("The numeric ID of the pull request where the comment will be added. This is the PR number shown in the Azure DevOps UI."),
785
786
  path: zod_1.z.string().describe("The full path to the file within the repository that the comment relates to. Must be a file changed in the PR (e.g., '/src/Models/User.cs')."),
786
- comment: zod_1.z.string().describe("The text content of the comment about the entire file. Can include markdown formatting. Should address file-level concerns, not specific lines.")
787
+ comment: zod_1.z.string().describe("The text content of the comment about the entire file. Can include markdown formatting. Should address file-level concerns, not specific lines."),
788
+ format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering.")
787
789
  }, async (params, extra) => {
788
790
  const result = await gitTools.addPullRequestFileComment(params);
789
791
  return {
@@ -795,7 +797,8 @@ async function main() {
795
797
  allowedTools.has("addPullRequestComment") && server.tool("addPullRequestComment", "Add a GENERAL comment about the entire pull request (not tied to any file or code). Appears in the Overview/Conversation tab. WHEN TO USE: Provide overall feedback, discuss architecture, approve/reject the PR, ask general questions, or comment on the PR description. EXAMPLES: 'This feature looks great! LGTM after CI passes', 'Can you add integration tests for this feature?', 'What's the performance impact of these changes?', 'Please update the documentation before merging'.", {
796
798
  repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
797
799
  pullRequestId: zId().describe("The numeric ID of the pull request where the comment will be added. This is the PR number shown in the Azure DevOps UI."),
798
- comment: zod_1.z.string().describe("The text content of the general comment about the PR. Can include markdown formatting for rich text, code blocks, links, etc. Should address PR-level concerns, not specific files or lines.")
800
+ comment: zod_1.z.string().describe("The text content of the general comment about the PR. Can include markdown formatting for rich text, code blocks, links, etc. Should address PR-level concerns, not specific files or lines."),
801
+ format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering.")
799
802
  }, async (params, extra) => {
800
803
  const result = await gitTools.addPullRequestComment(params);
801
804
  return {
@@ -855,7 +858,7 @@ async function main() {
855
858
  targetRefName: zod_1.z.string().optional().describe("Change target branch (e.g., 'refs/heads/main')"),
856
859
  }, async (params) => {
857
860
  const result = await gitTools.updatePullRequest(params);
858
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
861
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
859
862
  });
860
863
  allowedTools.has("updatePullRequestReviewers") && server.tool("updatePullRequestReviewers", "Add or remove reviewers on an existing pull request", {
861
864
  repository: zod_1.z.string().describe("Repository name or ID"),
@@ -865,16 +868,17 @@ async function main() {
865
868
  makeRequired: zod_1.z.boolean().optional().describe("Make added reviewers required (default false)"),
866
869
  }, async (params) => {
867
870
  const result = await gitTools.updatePullRequestReviewers(params);
868
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
871
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
869
872
  });
870
873
  allowedTools.has("replyToComment") && server.tool("replyToComment", "Reply to an existing comment thread on a pull request", {
871
874
  repository: zod_1.z.string().describe("Repository name or ID"),
872
875
  pullRequestId: zId().describe("Pull request ID"),
873
876
  threadId: zId().describe("Thread ID to reply to"),
874
877
  comment: zod_1.z.string().describe("Reply text content (supports markdown)"),
878
+ format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering."),
875
879
  }, async (params) => {
876
880
  const result = await gitTools.replyToComment(params);
877
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
881
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
878
882
  });
879
883
  allowedTools.has("updatePullRequestThread") && server.tool("updatePullRequestThread", "Update a comment thread's status (resolve, reactivate, close, etc.)", {
880
884
  repository: zod_1.z.string().describe("Repository name or ID"),
@@ -883,7 +887,7 @@ async function main() {
883
887
  status: zod_1.z.enum(['active', 'byDesign', 'closed', 'fixed', 'pending', 'unknown', 'wontFix']).describe("New thread status"),
884
888
  }, async (params) => {
885
889
  const result = await gitTools.updatePullRequestThread(params);
886
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
890
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
887
891
  });
888
892
  allowedTools.has("createBranch") && server.tool("createBranch", "Create a new branch from a source branch name or commit SHA", {
889
893
  repository: zod_1.z.string().describe("Repository name or ID"),
@@ -891,7 +895,7 @@ async function main() {
891
895
  sourceRef: zod_1.z.string().describe("Source branch name (e.g., 'main') or commit SHA to branch from"),
892
896
  }, async (params) => {
893
897
  const result = await gitTools.createBranch(params);
894
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
898
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
895
899
  });
896
900
  // Register Testing Capabilities Tools
897
901
  allowedTools.has("runAutomatedTests") && server.tool("runAutomatedTests", "Execute automated test suites", {
@@ -1519,14 +1523,14 @@ async function main() {
1519
1523
  project: zod_1.z.string().optional().describe("Project name or ID (defaults to configured project)"),
1520
1524
  }, async (params) => {
1521
1525
  const result = await wikiTools.listWikis(params);
1522
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1526
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1523
1527
  });
1524
1528
  allowedTools.has("getWiki") && server.tool("getWiki", "Get details about a specific wiki", {
1525
1529
  wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
1526
1530
  project: zod_1.z.string().optional().describe("Project name or ID"),
1527
1531
  }, async (params) => {
1528
1532
  const result = await wikiTools.getWiki(params);
1529
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1533
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1530
1534
  });
1531
1535
  allowedTools.has("listWikiPages") && server.tool("listWikiPages", "List wiki pages under a path", {
1532
1536
  wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
@@ -1535,7 +1539,7 @@ async function main() {
1535
1539
  project: zod_1.z.string().optional().describe("Project name or ID"),
1536
1540
  }, async (params) => {
1537
1541
  const result = await wikiTools.listWikiPages(params);
1538
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1542
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1539
1543
  });
1540
1544
  allowedTools.has("getWikiPageContent") && server.tool("getWikiPageContent", "Get the content of a wiki page", {
1541
1545
  wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
@@ -1543,7 +1547,7 @@ async function main() {
1543
1547
  project: zod_1.z.string().optional().describe("Project name or ID"),
1544
1548
  }, async (params) => {
1545
1549
  const result = await wikiTools.getWikiPageContent(params);
1546
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1550
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1547
1551
  });
1548
1552
  allowedTools.has("createOrUpdateWikiPage") && server.tool("createOrUpdateWikiPage", "Create or update a wiki page with the given content", {
1549
1553
  wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
@@ -1553,10 +1557,11 @@ async function main() {
1553
1557
  project: zod_1.z.string().optional().describe("Project name or ID"),
1554
1558
  }, async (params) => {
1555
1559
  const result = await wikiTools.createOrUpdateWikiPage(params);
1556
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1560
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1557
1561
  });
1558
1562
  // Register Build/Pipeline Tools
1559
1563
  allowedTools.has("getBuilds") && server.tool("getBuilds", "List builds with optional filters (status, result, branch, definition, tags)", {
1564
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1560
1565
  definitions: zIdArray().optional().describe("Filter by definition IDs"),
1561
1566
  statusFilter: zod_1.z.string().optional().describe("Filter by status: inProgress, completed, cancelling, postponed, notStarted, all"),
1562
1567
  resultFilter: zod_1.z.string().optional().describe("Filter by result: succeeded, partiallySucceeded, failed, canceled"),
@@ -1569,31 +1574,35 @@ async function main() {
1569
1574
  queryOrder: zod_1.z.string().optional().describe("Order: startTimeDescending (default) or startTimeAscending"),
1570
1575
  }, async (params) => {
1571
1576
  const result = await buildTools.getBuilds(params);
1572
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1577
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1573
1578
  });
1574
1579
  allowedTools.has("getBuild") && server.tool("getBuild", "Get detailed information about a specific build by ID", {
1580
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1575
1581
  buildId: zId().describe("Build ID"),
1576
1582
  }, async (params) => {
1577
1583
  const result = await buildTools.getBuild(params);
1578
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1584
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1579
1585
  });
1580
1586
  allowedTools.has("getBuildLog") && server.tool("getBuildLog", "Get build logs. Without logId returns log metadata list; with logId returns specific log content", {
1587
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1581
1588
  buildId: zId().describe("Build ID"),
1582
1589
  logId: zIdOptional().describe("Specific log ID to retrieve content for"),
1583
1590
  startLine: zod_1.z.coerce.number().optional().describe("Start line for log content"),
1584
1591
  endLine: zod_1.z.coerce.number().optional().describe("End line for log content"),
1585
1592
  }, async (params) => {
1586
1593
  const result = await buildTools.getBuildLog(params);
1587
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1594
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1588
1595
  });
1589
1596
  allowedTools.has("getBuildChanges") && server.tool("getBuildChanges", "Get changes (commits) associated with a build", {
1597
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1590
1598
  buildId: zId().describe("Build ID"),
1591
1599
  top: zod_1.z.coerce.number().optional().describe("Maximum number of changes to return (default 50)"),
1592
1600
  }, async (params) => {
1593
1601
  const result = await buildTools.getBuildChanges(params);
1594
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1602
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1595
1603
  });
1596
1604
  allowedTools.has("getDefinitions") && server.tool("getDefinitions", "List pipeline/build definitions with optional filters", {
1605
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1597
1606
  name: zod_1.z.string().optional().describe("Filter by definition name (wildcard supported)"),
1598
1607
  repositoryId: zod_1.z.string().optional().describe("Filter by repository ID"),
1599
1608
  repositoryType: zod_1.z.string().optional().describe("Repository type (e.g., 'TfsGit')"),
@@ -1602,41 +1611,56 @@ async function main() {
1602
1611
  includeLatestBuilds: zod_1.z.boolean().optional().describe("Include latest build info for each definition"),
1603
1612
  }, async (params) => {
1604
1613
  const result = await buildTools.getDefinitions(params);
1605
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1614
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1606
1615
  });
1607
1616
  allowedTools.has("getDefinition") && server.tool("getDefinition", "Get detailed information about a specific pipeline/build definition", {
1617
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1608
1618
  definitionId: zId().describe("Definition ID"),
1609
1619
  includeLatestBuilds: zod_1.z.boolean().optional().describe("Include latest build info"),
1610
1620
  }, async (params) => {
1611
1621
  const result = await buildTools.getDefinition(params);
1612
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1622
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1613
1623
  });
1614
1624
  allowedTools.has("runPipeline") && server.tool("runPipeline", "Queue/trigger a pipeline run", {
1625
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1615
1626
  definitionId: zId().describe("Pipeline definition ID to run"),
1616
1627
  sourceBranch: zod_1.z.string().optional().describe("Source branch (e.g., 'refs/heads/main')"),
1617
1628
  parameters: zod_1.z.record(zod_1.z.string()).optional().describe("Pipeline parameters as key-value pairs"),
1618
1629
  }, async (params) => {
1619
1630
  const result = await buildTools.runPipeline(params);
1620
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1631
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1621
1632
  });
1622
1633
  allowedTools.has("getBuildArtifacts") && server.tool("getBuildArtifacts", "List artifacts produced by a build", {
1634
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1623
1635
  buildId: zId().describe("Build ID"),
1624
1636
  }, async (params) => {
1625
1637
  const result = await buildTools.getBuildArtifacts(params);
1626
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1638
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1627
1639
  });
1628
1640
  allowedTools.has("getBuildTimeline") && server.tool("getBuildTimeline", "Get build timeline showing stages, jobs, and tasks with their status", {
1641
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1629
1642
  buildId: zId().describe("Build ID"),
1630
1643
  }, async (params) => {
1631
1644
  const result = await buildTools.getBuildTimeline(params);
1632
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1645
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1633
1646
  });
1634
1647
  allowedTools.has("getBuildWorkItems") && server.tool("getBuildWorkItems", "Get work items associated with a build", {
1648
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1635
1649
  buildId: zId().describe("Build ID"),
1636
1650
  top: zod_1.z.coerce.number().optional().describe("Maximum number of work items to return (default 50)"),
1637
1651
  }, async (params) => {
1638
1652
  const result = await buildTools.getBuildWorkItems(params);
1639
- return { content: result.content, rawData: result.rawData, structuredContent: result.structuredContent };
1653
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1654
+ });
1655
+ allowedTools.has("getPullRequestBuilds") && server.tool("getPullRequestBuilds", "Get builds associated with a pull request. Extracts build IDs from PR policy evaluations and returns build details with optional timeline and log metadata. Use this to find build IDs for a PR, then use getBuildLog to read specific log content.", {
1656
+ project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
1657
+ repository: zod_1.z.string().describe("Repository name or ID containing the pull request"),
1658
+ pullRequestId: zId().describe("The pull request ID"),
1659
+ includeTimeline: zod_1.z.boolean().optional().describe("Include build timeline (stages, jobs, tasks) for each build. Useful for seeing which stages/tasks failed."),
1660
+ includeLogs: zod_1.z.boolean().optional().describe("Include log metadata (log IDs and line counts) for each build. Use the log IDs with getBuildLog to read actual log content."),
1661
+ }, async (params) => {
1662
+ const result = await buildTools.getPullRequestBuilds(params);
1663
+ return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
1640
1664
  });
1641
1665
  // Create a transport (use stdio for simplicity)
1642
1666
  const transport = new stdio_js_1.StdioServerTransport();