@achieveai/azuredevops-mcp 1.3.17 → 1.3.19
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 +76 -0
- package/dist/Interfaces/Common.js +37 -1
- package/dist/Interfaces/Common.js.map +1 -1
- package/dist/Services/AzureDevOpsService.js +234 -32
- package/dist/Services/AzureDevOpsService.js.map +1 -1
- package/dist/Services/BoardsSprintsService.js +111 -13
- package/dist/Services/BoardsSprintsService.js.map +1 -1
- package/dist/Services/BuildService.js +157 -24
- package/dist/Services/BuildService.js.map +1 -1
- package/dist/Services/GitService.js +26 -3
- package/dist/Services/GitService.js.map +1 -1
- package/dist/Services/ProjectService.js +47 -6
- package/dist/Services/ProjectService.js.map +1 -1
- package/dist/Services/WorkItemService.js +183 -170
- package/dist/Services/WorkItemService.js.map +1 -1
- package/dist/Tools/BoardsSprintsTools.js +2 -8
- package/dist/Tools/BoardsSprintsTools.js.map +1 -1
- package/dist/Tools/BuildTools.js +5 -8
- package/dist/Tools/BuildTools.js.map +1 -1
- package/dist/Tools/GitTools.js +177 -62
- package/dist/Tools/GitTools.js.map +1 -1
- package/dist/Tools/WorkItemTools.js +110 -172
- package/dist/Tools/WorkItemTools.js.map +1 -1
- package/dist/index.js +31 -26
- package/dist/index.js.map +1 -1
- package/dist/utils/apiUsageGuidance.js +336 -0
- package/dist/utils/apiUsageGuidance.js.map +1 -0
- package/dist/utils/formatHelpers.js +15 -0
- package/dist/utils/formatHelpers.js.map +1 -1
- package/package.json +3 -3
- package/dist/Services/BuildService.project.test.js +0 -91
- package/dist/Services/BuildService.project.test.js.map +0 -1
- package/dist/Services/GitService.project.test.js +0 -407
- package/dist/Services/GitService.project.test.js.map +0 -1
- package/dist/package.json +0 -59
- package/dist/src/Interfaces/AIAssisted.js +0 -3
- package/dist/src/Interfaces/AIAssisted.js.map +0 -1
- package/dist/src/Interfaces/ArtifactManagement.js +0 -3
- package/dist/src/Interfaces/ArtifactManagement.js.map +0 -1
- package/dist/src/Interfaces/AzureDevOps.js +0 -3
- package/dist/src/Interfaces/AzureDevOps.js.map +0 -1
- package/dist/src/Interfaces/BoardsAndSprints.js +0 -3
- package/dist/src/Interfaces/BoardsAndSprints.js.map +0 -1
- package/dist/src/Interfaces/CodeAndRepositories.js +0 -3
- package/dist/src/Interfaces/CodeAndRepositories.js.map +0 -1
- package/dist/src/Interfaces/Common.js +0 -134
- package/dist/src/Interfaces/Common.js.map +0 -1
- package/dist/src/Interfaces/CostResourceManagement.js +0 -3
- package/dist/src/Interfaces/CostResourceManagement.js.map +0 -1
- package/dist/src/Interfaces/DevSecOps.js +0 -3
- package/dist/src/Interfaces/DevSecOps.js.map +0 -1
- package/dist/src/Interfaces/ExternalIntegrations.js +0 -3
- package/dist/src/Interfaces/ExternalIntegrations.js.map +0 -1
- package/dist/src/Interfaces/HybridCrossPlatform.js +0 -3
- package/dist/src/Interfaces/HybridCrossPlatform.js.map +0 -1
- package/dist/src/Interfaces/Pipelines.js +0 -3
- package/dist/src/Interfaces/Pipelines.js.map +0 -1
- package/dist/src/Interfaces/ProjectManagement.js +0 -3
- package/dist/src/Interfaces/ProjectManagement.js.map +0 -1
- package/dist/src/Interfaces/TestingCapabilities.js +0 -3
- package/dist/src/Interfaces/TestingCapabilities.js.map +0 -1
- package/dist/src/Interfaces/Wiki.js +0 -3
- package/dist/src/Interfaces/Wiki.js.map +0 -1
- package/dist/src/Interfaces/WorkItems.js +0 -3
- package/dist/src/Interfaces/WorkItems.js.map +0 -1
- package/dist/src/Services/AIAssistedDevelopmentService.js +0 -195
- package/dist/src/Services/AIAssistedDevelopmentService.js.map +0 -1
- package/dist/src/Services/ArtifactManagementService.js +0 -346
- package/dist/src/Services/ArtifactManagementService.js.map +0 -1
- package/dist/src/Services/AzureDevOpsService.js +0 -385
- package/dist/src/Services/AzureDevOpsService.js.map +0 -1
- package/dist/src/Services/BoardsSprintsService.js +0 -339
- package/dist/src/Services/BoardsSprintsService.js.map +0 -1
- package/dist/src/Services/BuildService.js +0 -405
- package/dist/src/Services/BuildService.js.map +0 -1
- package/dist/src/Services/DevSecOpsService.js +0 -307
- package/dist/src/Services/DevSecOpsService.js.map +0 -1
- package/dist/src/Services/EntraAuthHandler.js +0 -337
- package/dist/src/Services/EntraAuthHandler.js.map +0 -1
- package/dist/src/Services/GitService.js +0 -1595
- package/dist/src/Services/GitService.js.map +0 -1
- package/dist/src/Services/ProjectService.js +0 -257
- package/dist/src/Services/ProjectService.js.map +0 -1
- package/dist/src/Services/TestingCapabilitiesService.js +0 -149
- package/dist/src/Services/TestingCapabilitiesService.js.map +0 -1
- package/dist/src/Services/WikiService.js +0 -90
- package/dist/src/Services/WikiService.js.map +0 -1
- package/dist/src/Services/WorkItemService.js +0 -885
- package/dist/src/Services/WorkItemService.js.map +0 -1
- package/dist/src/Tools/AIAssistedDevelopmentTools.js +0 -137
- package/dist/src/Tools/AIAssistedDevelopmentTools.js.map +0 -1
- package/dist/src/Tools/ArtifactManagementTools.js +0 -140
- package/dist/src/Tools/ArtifactManagementTools.js.map +0 -1
- package/dist/src/Tools/BoardsSprintsTools.js +0 -338
- package/dist/src/Tools/BoardsSprintsTools.js.map +0 -1
- package/dist/src/Tools/BuildTools.js +0 -468
- package/dist/src/Tools/BuildTools.js.map +0 -1
- package/dist/src/Tools/DevSecOpsTools.js +0 -147
- package/dist/src/Tools/DevSecOpsTools.js.map +0 -1
- package/dist/src/Tools/GitTools.js +0 -1475
- package/dist/src/Tools/GitTools.js.map +0 -1
- package/dist/src/Tools/ProjectTools.js +0 -360
- package/dist/src/Tools/ProjectTools.js.map +0 -1
- package/dist/src/Tools/TestingCapabilitiesTools.js +0 -157
- package/dist/src/Tools/TestingCapabilitiesTools.js.map +0 -1
- package/dist/src/Tools/WikiTools.js +0 -137
- package/dist/src/Tools/WikiTools.js.map +0 -1
- package/dist/src/Tools/WorkItemTools.js +0 -862
- package/dist/src/Tools/WorkItemTools.js.map +0 -1
- package/dist/src/config.js +0 -176
- package/dist/src/config.js.map +0 -1
- package/dist/src/index.js +0 -1716
- package/dist/src/index.js.map +0 -1
- package/dist/src/utils/formatHelpers.js +0 -257
- package/dist/src/utils/formatHelpers.js.map +0 -1
- package/dist/src/utils/getClassMethods.js +0 -8
- package/dist/src/utils/getClassMethods.js.map +0 -1
- package/dist/src/utils/repositoryResolver.js +0 -40
- package/dist/src/utils/repositoryResolver.js.map +0 -1
package/dist/src/index.js
DELETED
|
@@ -1,1716 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
|
-
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
|
-
const config_1 = require("./config");
|
|
7
|
-
const WorkItemTools_1 = require("./Tools/WorkItemTools");
|
|
8
|
-
const BoardsSprintsTools_1 = require("./Tools/BoardsSprintsTools");
|
|
9
|
-
const ProjectTools_1 = require("./Tools/ProjectTools");
|
|
10
|
-
const GitTools_1 = require("./Tools/GitTools");
|
|
11
|
-
const TestingCapabilitiesTools_1 = require("./Tools/TestingCapabilitiesTools");
|
|
12
|
-
const DevSecOpsTools_1 = require("./Tools/DevSecOpsTools");
|
|
13
|
-
const ArtifactManagementTools_1 = require("./Tools/ArtifactManagementTools");
|
|
14
|
-
const AIAssistedDevelopmentTools_1 = require("./Tools/AIAssistedDevelopmentTools");
|
|
15
|
-
const BuildTools_1 = require("./Tools/BuildTools");
|
|
16
|
-
const WikiTools_1 = require("./Tools/WikiTools");
|
|
17
|
-
const zod_1 = require("zod");
|
|
18
|
-
const Common_1 = require("./Interfaces/Common");
|
|
19
|
-
/** Wrap a value so string-encoded JSON arrays are auto-parsed (some MCP clients send arrays as strings). */
|
|
20
|
-
const coerceArray = (val) => {
|
|
21
|
-
if (typeof val !== 'string')
|
|
22
|
-
return val;
|
|
23
|
-
try {
|
|
24
|
-
return JSON.parse(val);
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
throw new Error(`Expected a JSON array (e.g. [1, 2, 3]) but received: "${val.length > 50 ? val.slice(0, 50) + '...' : val}"`);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Strip common prefixes/symbols from ID values so LLMs can pass
|
|
32
|
-
* "123", "#123", "WI#123", "PR 456", "BUILD#789", etc.
|
|
33
|
-
* Returns a number or NaN (which z.number() will reject with a clear error).
|
|
34
|
-
*/
|
|
35
|
-
const coerceId = (val) => {
|
|
36
|
-
if (typeof val === 'number')
|
|
37
|
-
return val;
|
|
38
|
-
if (typeof val !== 'string')
|
|
39
|
-
return NaN;
|
|
40
|
-
// Strip known prefixes: WI#, PR#, BUILD#, leading #, or any "Word " / "Word#" prefix
|
|
41
|
-
const cleaned = val.trim().replace(/^(?:[A-Za-z]+[#\s])?#?/, '');
|
|
42
|
-
if (cleaned === '')
|
|
43
|
-
return NaN;
|
|
44
|
-
const num = Number(cleaned);
|
|
45
|
-
return Number.isSafeInteger(num) && num > 0 ? num : NaN;
|
|
46
|
-
};
|
|
47
|
-
/** Zod schema for an ID parameter — accepts numbers and common LLM string formats like "#123", "WI#123", "PR 456" */
|
|
48
|
-
const zId = () => zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).transform(coerceId).pipe(zod_1.z.number().int().min(1));
|
|
49
|
-
/** Zod schema for an optional ID parameter */
|
|
50
|
-
const zIdOptional = () => zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).transform(coerceId).pipe(zod_1.z.number().int().min(1)).optional();
|
|
51
|
-
/** Zod schema for an array of IDs */
|
|
52
|
-
const zIdArray = () => zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).transform(coerceId).pipe(zod_1.z.number().int().min(1))));
|
|
53
|
-
const EntraAuthHandler_1 = require("./Services/EntraAuthHandler");
|
|
54
|
-
async function main() {
|
|
55
|
-
try {
|
|
56
|
-
// Load configuration
|
|
57
|
-
const azureDevOpsConfig = (0, config_1.getAzureDevOpsConfig)();
|
|
58
|
-
// Initialize token credential auth handler based on auth type
|
|
59
|
-
console.error(`[Auth] Auth type: ${azureDevOpsConfig.auth?.type}, PAT: ${azureDevOpsConfig.personalAccessToken ? 'set' : 'not set'}`);
|
|
60
|
-
if (azureDevOpsConfig.auth?.type === 'entra') {
|
|
61
|
-
console.error('[Auth] Initializing Entra (DefaultAzureCredential + InteractiveBrowser fallback)...');
|
|
62
|
-
azureDevOpsConfig.tokenCredentialAuthHandler = await EntraAuthHandler_1.TokenCredentialAuthHandler.createEntra();
|
|
63
|
-
console.error('[Auth] Entra auth handler initialized successfully.');
|
|
64
|
-
}
|
|
65
|
-
else if (azureDevOpsConfig.auth?.type === 'azcli') {
|
|
66
|
-
azureDevOpsConfig.tokenCredentialAuthHandler = await EntraAuthHandler_1.TokenCredentialAuthHandler.createAzureCli(azureDevOpsConfig.auth.tenantId);
|
|
67
|
-
}
|
|
68
|
-
else if (azureDevOpsConfig.auth?.type === 'interactive') {
|
|
69
|
-
azureDevOpsConfig.tokenCredentialAuthHandler = await EntraAuthHandler_1.TokenCredentialAuthHandler.createInteractive({
|
|
70
|
-
tenantId: azureDevOpsConfig.auth.tenantId,
|
|
71
|
-
clientId: azureDevOpsConfig.auth.clientId,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
// Make config available to error formatting for better error hints
|
|
75
|
-
(0, Common_1.setErrorContext)({ orgUrl: azureDevOpsConfig.orgUrl, project: azureDevOpsConfig.project, authType: azureDevOpsConfig.auth?.type });
|
|
76
|
-
// Load allowed tools
|
|
77
|
-
const allowedTools = (0, config_1.getAllowedTools)();
|
|
78
|
-
// Initialize tools
|
|
79
|
-
const workItemTools = new WorkItemTools_1.WorkItemTools(azureDevOpsConfig);
|
|
80
|
-
const boardsSprintsTools = new BoardsSprintsTools_1.BoardsSprintsTools(azureDevOpsConfig);
|
|
81
|
-
const projectTools = new ProjectTools_1.ProjectTools(azureDevOpsConfig);
|
|
82
|
-
const gitTools = new GitTools_1.GitTools(azureDevOpsConfig);
|
|
83
|
-
const testingCapabilitiesTools = new TestingCapabilitiesTools_1.TestingCapabilitiesTools(azureDevOpsConfig);
|
|
84
|
-
const devSecOpsTools = new DevSecOpsTools_1.DevSecOpsTools(azureDevOpsConfig);
|
|
85
|
-
const artifactManagementTools = new ArtifactManagementTools_1.ArtifactManagementTools(azureDevOpsConfig);
|
|
86
|
-
const aiAssistedDevelopmentTools = new AIAssistedDevelopmentTools_1.AIAssistedDevelopmentTools(azureDevOpsConfig);
|
|
87
|
-
const buildTools = new BuildTools_1.BuildTools(azureDevOpsConfig);
|
|
88
|
-
const wikiTools = new WikiTools_1.WikiTools(azureDevOpsConfig);
|
|
89
|
-
// Create MCP server
|
|
90
|
-
const server = new mcp_js_1.McpServer({
|
|
91
|
-
name: 'azure-devops-mcp',
|
|
92
|
-
version: '1.0.0',
|
|
93
|
-
});
|
|
94
|
-
// Register Work Item Tools
|
|
95
|
-
allowedTools.has("listWorkItems") && server.tool("listWorkItems", "List work items based on a WIQL query. By default, flat queries are scoped to recently changed work items.", {
|
|
96
|
-
query: zod_1.z.string().describe("WIQL query to get work items"),
|
|
97
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of work items to return (default 100)"),
|
|
98
|
-
days: zod_1.z.coerce.number().optional().describe("For flat WorkItems queries, scope to items changed in the last N days (default 7)"),
|
|
99
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for the returned items. Defaults to a basic summary field set.")
|
|
100
|
-
}, async (params, extra) => {
|
|
101
|
-
const result = await workItemTools.listWorkItems({ query: params.query, top: params.top, days: params.days, fields: params.fields });
|
|
102
|
-
return {
|
|
103
|
-
content: result.content,
|
|
104
|
-
rawData: result.rawData,
|
|
105
|
-
isError: result.isError
|
|
106
|
-
};
|
|
107
|
-
});
|
|
108
|
-
allowedTools.has("getWorkItemById") && server.tool("getWorkItemById", "Get a specific work item by ID with summary and detailed view", {
|
|
109
|
-
id: zId().describe("Work item ID"),
|
|
110
|
-
fullDescription: zod_1.z.boolean().optional().default(false).describe("Return the full description without truncation")
|
|
111
|
-
}, async (params, extra) => {
|
|
112
|
-
const result = await workItemTools.getWorkItemById(params);
|
|
113
|
-
return {
|
|
114
|
-
content: result.content,
|
|
115
|
-
rawData: result.rawData,
|
|
116
|
-
isError: result.isError,
|
|
117
|
-
structuredContent: result.structuredContent
|
|
118
|
-
};
|
|
119
|
-
});
|
|
120
|
-
allowedTools.has("searchWorkItems") && server.tool("searchWorkItems", "Search for work items by text. Uses CONTAINS-based WIQL, returns basic summary fields via a batched fetch, and includes the generated WIQL so callers can move to focused queries.", {
|
|
121
|
-
searchText: zod_1.z.string().describe("Text to search for in work items"),
|
|
122
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of work items to return (default 25)"),
|
|
123
|
-
days: zod_1.z.coerce.number().optional().describe("Scope search to items changed in the last N days (default 7)"),
|
|
124
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for matched items. Defaults to a basic summary field set.")
|
|
125
|
-
}, async (params, extra) => {
|
|
126
|
-
const result = await workItemTools.searchWorkItems(params);
|
|
127
|
-
return {
|
|
128
|
-
content: result.content,
|
|
129
|
-
rawData: result.rawData,
|
|
130
|
-
isError: result.isError,
|
|
131
|
-
structuredContent: result.structuredContent
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
allowedTools.has("getRecentlyUpdatedWorkItems") && server.tool("getRecentlyUpdatedWorkItems", "Get recently updated work items", {
|
|
135
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of work items to return"),
|
|
136
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of work items to skip"),
|
|
137
|
-
days: zod_1.z.coerce.number().optional().describe("Number of days to look back (default 7)"),
|
|
138
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for returned items. Defaults to a basic summary field set.")
|
|
139
|
-
}, async (params, extra) => {
|
|
140
|
-
const result = await workItemTools.getRecentlyUpdatedWorkItems(params);
|
|
141
|
-
return {
|
|
142
|
-
content: result.content,
|
|
143
|
-
rawData: result.rawData,
|
|
144
|
-
isError: result.isError
|
|
145
|
-
};
|
|
146
|
-
});
|
|
147
|
-
allowedTools.has("getMyWorkItems") && server.tool("getMyWorkItems", "Get work items assigned to you. By default, only recently changed items are returned.", {
|
|
148
|
-
state: zod_1.z.string().optional().describe("Filter by work item state"),
|
|
149
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of work items to return (default 50)"),
|
|
150
|
-
days: zod_1.z.coerce.number().optional().describe("Scope to items changed in the last N days (default 7)"),
|
|
151
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for returned items. Defaults to a basic summary field set.")
|
|
152
|
-
}, async (params, extra) => {
|
|
153
|
-
const result = await workItemTools.getMyWorkItems(params);
|
|
154
|
-
return {
|
|
155
|
-
content: result.content,
|
|
156
|
-
rawData: result.rawData,
|
|
157
|
-
isError: result.isError
|
|
158
|
-
};
|
|
159
|
-
});
|
|
160
|
-
allowedTools.has("createWorkItem") && server.tool("createWorkItem", "Create a new work item. Text fields support markdown (auto-converted to HTML). Use #ID to reference work items, @user to mention people.", {
|
|
161
|
-
workItemType: zod_1.z.string().describe("Type of work item to create"),
|
|
162
|
-
title: zod_1.z.string().describe("Title of the work item"),
|
|
163
|
-
description: zod_1.z.string().optional().describe("Description (markdown). Use #ID to link work items, @user to mention people"),
|
|
164
|
-
assignedTo: zod_1.z.string().optional().describe("User to assign the work item to"),
|
|
165
|
-
state: zod_1.z.string().optional().describe("Initial state of the work item"),
|
|
166
|
-
areaPath: zod_1.z.string().optional().describe("Area path for the work item"),
|
|
167
|
-
iterationPath: zod_1.z.string().optional().describe("Iteration path for the work item"),
|
|
168
|
-
additionalFields: zod_1.z.record(zod_1.z.any()).optional().describe("Additional fields to set on the work item")
|
|
169
|
-
}, async (params, extra) => {
|
|
170
|
-
const result = await workItemTools.createWorkItem(params);
|
|
171
|
-
return {
|
|
172
|
-
content: result.content,
|
|
173
|
-
rawData: result.rawData,
|
|
174
|
-
isError: result.isError,
|
|
175
|
-
structuredContent: result.structuredContent
|
|
176
|
-
};
|
|
177
|
-
});
|
|
178
|
-
allowedTools.has("updateWorkItem") && server.tool("updateWorkItem", "Update an existing work item. Rich-text fields (System.Description, System.History, AcceptanceCriteria) accept markdown (auto-converted to HTML). Use #ID to reference work items, @user to mention people.", {
|
|
179
|
-
id: zId().describe("ID of the work item to update"),
|
|
180
|
-
fields: zod_1.z.record(zod_1.z.any()).describe("Fields to update. Rich-text fields like System.Description accept markdown")
|
|
181
|
-
}, async (params, extra) => {
|
|
182
|
-
const result = await workItemTools.updateWorkItem(params);
|
|
183
|
-
return {
|
|
184
|
-
content: result.content,
|
|
185
|
-
rawData: result.rawData,
|
|
186
|
-
isError: result.isError,
|
|
187
|
-
structuredContent: result.structuredContent
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
allowedTools.has("getWorkItemComments") && server.tool("getWorkItemComments", "Get comments on a work item", {
|
|
191
|
-
id: zId().describe("ID of the work item"),
|
|
192
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of comments to return"),
|
|
193
|
-
order: zod_1.z.enum(['asc', 'desc']).optional().default('desc').describe("Sort order: 'asc' (oldest first) or 'desc' (newest first)"),
|
|
194
|
-
includeDeleted: zod_1.z.boolean().optional().describe("Include deleted comments")
|
|
195
|
-
}, async (params, extra) => {
|
|
196
|
-
const result = await workItemTools.getWorkItemComments(params);
|
|
197
|
-
return {
|
|
198
|
-
content: result.content,
|
|
199
|
-
rawData: result.rawData,
|
|
200
|
-
isError: result.isError,
|
|
201
|
-
structuredContent: result.structuredContent
|
|
202
|
-
};
|
|
203
|
-
});
|
|
204
|
-
allowedTools.has("addWorkItemComment") && server.tool("addWorkItemComment", "Add a comment to a work item. Supports markdown formatting by default. Use #ID to reference work items, @user to mention people.", {
|
|
205
|
-
id: zId().describe("ID of the work item"),
|
|
206
|
-
text: zod_1.z.string().describe("Comment text. Supports full markdown — use #ID to link work items, @user to mention people. IMPORTANT: Use actual newline characters in the JSON string for line breaks — do NOT send literal backslash-n text."),
|
|
207
|
-
format: zod_1.z.enum(['markdown', 'html']).optional().default('markdown').describe("Comment format: 'markdown' (default) or 'html'")
|
|
208
|
-
}, async (params, extra) => {
|
|
209
|
-
const result = await workItemTools.addWorkItemComment(params);
|
|
210
|
-
return {
|
|
211
|
-
content: result.content,
|
|
212
|
-
rawData: result.rawData,
|
|
213
|
-
isError: result.isError,
|
|
214
|
-
structuredContent: result.structuredContent
|
|
215
|
-
};
|
|
216
|
-
});
|
|
217
|
-
allowedTools.has("manageWorkItemComment") && server.tool("manageWorkItemComment", "Add or update a comment on a work item. Use action 'add' for new comments, 'update' to edit existing ones. Markdown supported. Use #ID to reference work items, @user to mention people.", {
|
|
218
|
-
action: zod_1.z.enum(['add', 'update']).describe("'add' for new comment, 'update' to edit existing"),
|
|
219
|
-
id: zId().describe("Work item ID"),
|
|
220
|
-
text: zod_1.z.string().describe("Comment text. Supports full markdown. IMPORTANT: Use actual newline characters in the JSON string for line breaks — do NOT send literal backslash-n text."),
|
|
221
|
-
format: zod_1.z.enum(['markdown', 'html']).optional().default('markdown').describe("Comment format"),
|
|
222
|
-
commentId: zIdOptional().describe("Comment ID — required for 'update' action"),
|
|
223
|
-
}, async (params, extra) => {
|
|
224
|
-
const result = await workItemTools.manageWorkItemComment(params);
|
|
225
|
-
return {
|
|
226
|
-
content: result.content,
|
|
227
|
-
rawData: result.rawData,
|
|
228
|
-
isError: result.isError,
|
|
229
|
-
structuredContent: result.structuredContent
|
|
230
|
-
};
|
|
231
|
-
});
|
|
232
|
-
allowedTools.has("updateWorkItemState") && server.tool("updateWorkItemState", "Update the state of a work item", {
|
|
233
|
-
id: zId().describe("ID of the work item"),
|
|
234
|
-
state: zod_1.z.string().describe("New state for the work item"),
|
|
235
|
-
comment: zod_1.z.string().optional().describe("Comment explaining the state change")
|
|
236
|
-
}, async (params, extra) => {
|
|
237
|
-
const result = await workItemTools.updateWorkItemState(params);
|
|
238
|
-
return {
|
|
239
|
-
content: result.content,
|
|
240
|
-
rawData: result.rawData,
|
|
241
|
-
isError: result.isError
|
|
242
|
-
};
|
|
243
|
-
});
|
|
244
|
-
allowedTools.has("assignWorkItem") && server.tool("assignWorkItem", "Assign a work item to a user", {
|
|
245
|
-
id: zId().describe("ID of the work item"),
|
|
246
|
-
assignedTo: zod_1.z.string().describe("User to assign the work item to")
|
|
247
|
-
}, async (params, extra) => {
|
|
248
|
-
const result = await workItemTools.assignWorkItem(params);
|
|
249
|
-
return {
|
|
250
|
-
content: result.content,
|
|
251
|
-
rawData: result.rawData,
|
|
252
|
-
isError: result.isError
|
|
253
|
-
};
|
|
254
|
-
});
|
|
255
|
-
allowedTools.has("createLink") && server.tool("createLink", "Create a link between a work item and another work item or artifact. " +
|
|
256
|
-
"Use prefixes for targetId: WI#123 (work item), PR#456 (pull request), " +
|
|
257
|
-
"BUILD#789 (build), BRANCH#main (branch), COMMIT#abc123 (commit). " +
|
|
258
|
-
"Plain numbers default to work item.", {
|
|
259
|
-
sourceId: zId().describe("ID of the source work item"),
|
|
260
|
-
targetId: zod_1.z.string().describe("Target with prefix: WI#123, PR#456, BUILD#789, BRANCH#main, COMMIT#abc, or plain number for work item"),
|
|
261
|
-
linkType: zod_1.z.string().describe("Link type (e.g., System.LinkTypes.Related). For artifact prefixes, this is still required but the actual rel type is auto-set to ArtifactLink."),
|
|
262
|
-
comment: zod_1.z.string().optional().describe("Comment explaining the link"),
|
|
263
|
-
repository: zod_1.z.string().optional().describe("Repository name or ID. Required for PR#, BRANCH#, COMMIT# targets.")
|
|
264
|
-
}, async (params, extra) => {
|
|
265
|
-
const result = await workItemTools.createLink(params);
|
|
266
|
-
return {
|
|
267
|
-
content: result.content,
|
|
268
|
-
rawData: result.rawData,
|
|
269
|
-
isError: result.isError,
|
|
270
|
-
structuredContent: result.structuredContent
|
|
271
|
-
};
|
|
272
|
-
});
|
|
273
|
-
allowedTools.has("bulkCreateWorkItems") && server.tool("bulkCreateWorkItems", "Create or update multiple work items in a single operation", {
|
|
274
|
-
workItems: zod_1.z.array(zod_1.z.union([
|
|
275
|
-
zod_1.z.object({
|
|
276
|
-
workItemType: zod_1.z.string().describe("Type of work item to create"),
|
|
277
|
-
title: zod_1.z.string().describe("Title of the work item"),
|
|
278
|
-
description: zod_1.z.string().optional().describe("Description (markdown). Use #ID to link work items, @user to mention people"),
|
|
279
|
-
assignedTo: zod_1.z.string().optional().describe("User to assign the work item to"),
|
|
280
|
-
state: zod_1.z.string().optional().describe("Initial state of the work item"),
|
|
281
|
-
areaPath: zod_1.z.string().optional().describe("Area path for the work item"),
|
|
282
|
-
iterationPath: zod_1.z.string().optional().describe("Iteration path for the work item"),
|
|
283
|
-
additionalFields: zod_1.z.record(zod_1.z.any()).optional().describe("Additional fields to set on the work item")
|
|
284
|
-
}),
|
|
285
|
-
zod_1.z.object({
|
|
286
|
-
id: zId().describe("ID of work item to update"),
|
|
287
|
-
fields: zod_1.z.record(zod_1.z.any()).describe("Fields to update on the work item")
|
|
288
|
-
})
|
|
289
|
-
])).min(1).describe("Array of work items to create or update")
|
|
290
|
-
}, async (params, extra) => {
|
|
291
|
-
const result = await workItemTools.bulkCreateWorkItems(params);
|
|
292
|
-
return {
|
|
293
|
-
content: result.content,
|
|
294
|
-
rawData: result.rawData,
|
|
295
|
-
isError: result.isError
|
|
296
|
-
};
|
|
297
|
-
});
|
|
298
|
-
allowedTools.has("getWorkItemsBatch") && server.tool("getWorkItemsBatch", "Get multiple work items by their IDs in a single efficient call", {
|
|
299
|
-
ids: zIdArray().describe("Array of work item IDs to retrieve"),
|
|
300
|
-
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'])"),
|
|
301
|
-
}, async (params) => {
|
|
302
|
-
const result = await workItemTools.getWorkItemsBatch(params);
|
|
303
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
304
|
-
});
|
|
305
|
-
allowedTools.has("getWorkItemRevisions") && server.tool("getWorkItemRevisions", "Get revision/change history for a work item showing all field changes over time", {
|
|
306
|
-
id: zId().describe("Work item ID"),
|
|
307
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of revisions to return"),
|
|
308
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of revisions to skip"),
|
|
309
|
-
}, async (params) => {
|
|
310
|
-
const result = await workItemTools.getWorkItemRevisions(params);
|
|
311
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
312
|
-
});
|
|
313
|
-
allowedTools.has("getQueryResults") && server.tool("getQueryResults", "Execute a saved WIQL query by its query ID and return the resulting work items with a batched summary field set.", {
|
|
314
|
-
queryId: zod_1.z.string().describe("The GUID of the saved query to execute"),
|
|
315
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for the returned items. Defaults to a basic summary field set."),
|
|
316
|
-
}, async (params) => {
|
|
317
|
-
const result = await workItemTools.getQueryResults(params);
|
|
318
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
319
|
-
});
|
|
320
|
-
allowedTools.has("addChildWorkItem") && server.tool("addChildWorkItem", "Create a new work item and link it as a child of an existing parent work item", {
|
|
321
|
-
parentId: zId().describe("Parent work item ID"),
|
|
322
|
-
workItemType: zod_1.z.string().describe("Type of child work item (e.g., 'Task', 'Bug')"),
|
|
323
|
-
title: zod_1.z.string().describe("Title of the child work item"),
|
|
324
|
-
description: zod_1.z.string().optional().describe("Description (markdown). Use #ID to link work items, @user to mention people"),
|
|
325
|
-
assignedTo: zod_1.z.string().optional().describe("User to assign to"),
|
|
326
|
-
state: zod_1.z.string().optional().describe("Initial state"),
|
|
327
|
-
areaPath: zod_1.z.string().optional().describe("Area path"),
|
|
328
|
-
iterationPath: zod_1.z.string().optional().describe("Iteration path"),
|
|
329
|
-
additionalFields: zod_1.z.record(zod_1.z.any()).optional().describe("Additional fields"),
|
|
330
|
-
}, async (params) => {
|
|
331
|
-
const result = await workItemTools.addChildWorkItem(params);
|
|
332
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
333
|
-
});
|
|
334
|
-
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.", {
|
|
335
|
-
id: zId().describe("Work item ID"),
|
|
336
|
-
relationIndex: zod_1.z.coerce.number().describe("Index of the relation to remove (0-based, from the relations array)"),
|
|
337
|
-
}, async (params) => {
|
|
338
|
-
const result = await workItemTools.unlinkWorkItem(params);
|
|
339
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
340
|
-
});
|
|
341
|
-
// Register Boards & Sprints Tools
|
|
342
|
-
allowedTools.has("getBoards") && server.tool("getBoards", "Get all boards for a team", {
|
|
343
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)")
|
|
344
|
-
}, async (params, extra) => {
|
|
345
|
-
const result = await boardsSprintsTools.getBoards(params);
|
|
346
|
-
return {
|
|
347
|
-
content: result.content,
|
|
348
|
-
rawData: result.rawData,
|
|
349
|
-
isError: result.isError
|
|
350
|
-
};
|
|
351
|
-
});
|
|
352
|
-
allowedTools.has("getBoardColumns") && server.tool("getBoardColumns", "Get columns for a specific board", {
|
|
353
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)"),
|
|
354
|
-
boardId: zod_1.z.string().describe("ID of the board")
|
|
355
|
-
}, async (params, extra) => {
|
|
356
|
-
const result = await boardsSprintsTools.getBoardColumns(params);
|
|
357
|
-
return {
|
|
358
|
-
content: result.content,
|
|
359
|
-
rawData: result.rawData,
|
|
360
|
-
isError: result.isError
|
|
361
|
-
};
|
|
362
|
-
});
|
|
363
|
-
allowedTools.has("getBoardItems") && server.tool("getBoardItems", "Get items on a specific board", {
|
|
364
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)"),
|
|
365
|
-
boardId: zod_1.z.string().describe("ID of the board")
|
|
366
|
-
}, async (params, extra) => {
|
|
367
|
-
const result = await boardsSprintsTools.getBoardItems(params);
|
|
368
|
-
return {
|
|
369
|
-
content: result.content,
|
|
370
|
-
rawData: result.rawData,
|
|
371
|
-
isError: result.isError
|
|
372
|
-
};
|
|
373
|
-
});
|
|
374
|
-
allowedTools.has("moveCardOnBoard") && server.tool("moveCardOnBoard", "Move a card on a board", {
|
|
375
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)"),
|
|
376
|
-
boardId: zod_1.z.string().describe("ID of the board"),
|
|
377
|
-
workItemId: zId().describe("ID of the work item to move"),
|
|
378
|
-
columnId: zod_1.z.string().describe("ID of the column to move to"),
|
|
379
|
-
position: zod_1.z.coerce.number().optional().describe("Position within the column")
|
|
380
|
-
}, async (params, extra) => {
|
|
381
|
-
const result = await boardsSprintsTools.moveCardOnBoard(params);
|
|
382
|
-
return {
|
|
383
|
-
content: result.content,
|
|
384
|
-
rawData: result.rawData,
|
|
385
|
-
isError: result.isError
|
|
386
|
-
};
|
|
387
|
-
});
|
|
388
|
-
allowedTools.has("getSprints") && server.tool("getSprints", "Get all sprints for a team", {
|
|
389
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)")
|
|
390
|
-
}, async (params, extra) => {
|
|
391
|
-
const result = await boardsSprintsTools.getSprints(params);
|
|
392
|
-
return {
|
|
393
|
-
content: result.content,
|
|
394
|
-
rawData: result.rawData,
|
|
395
|
-
isError: result.isError
|
|
396
|
-
};
|
|
397
|
-
});
|
|
398
|
-
allowedTools.has("getCurrentSprint") && server.tool("getCurrentSprint", "Get the current sprint", {
|
|
399
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)")
|
|
400
|
-
}, async (params, extra) => {
|
|
401
|
-
const result = await boardsSprintsTools.getCurrentSprint(params);
|
|
402
|
-
return {
|
|
403
|
-
content: result.content,
|
|
404
|
-
rawData: result.rawData,
|
|
405
|
-
isError: result.isError
|
|
406
|
-
};
|
|
407
|
-
});
|
|
408
|
-
allowedTools.has("getSprintWorkItems") && server.tool("getSprintWorkItems", "Get work items in a specific sprint with a batched summary field set.", {
|
|
409
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)"),
|
|
410
|
-
sprintId: zod_1.z.string().describe("ID of the sprint"),
|
|
411
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for sprint items. Defaults to a basic summary field set.")
|
|
412
|
-
}, async (params, extra) => {
|
|
413
|
-
const result = await boardsSprintsTools.getSprintWorkItems(params);
|
|
414
|
-
return {
|
|
415
|
-
content: result.content,
|
|
416
|
-
rawData: result.rawData,
|
|
417
|
-
isError: result.isError
|
|
418
|
-
};
|
|
419
|
-
});
|
|
420
|
-
allowedTools.has("getSprintCapacity") && server.tool("getSprintCapacity", "Get capacity for a specific sprint", {
|
|
421
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)"),
|
|
422
|
-
sprintId: zod_1.z.string().describe("ID of the sprint")
|
|
423
|
-
}, async (params, extra) => {
|
|
424
|
-
const result = await boardsSprintsTools.getSprintCapacity(params);
|
|
425
|
-
return {
|
|
426
|
-
content: result.content,
|
|
427
|
-
rawData: result.rawData,
|
|
428
|
-
isError: result.isError
|
|
429
|
-
};
|
|
430
|
-
});
|
|
431
|
-
allowedTools.has("getTeamMembers") && server.tool("getTeamMembers", "Get members of a team", {
|
|
432
|
-
teamId: zod_1.z.string().optional().describe("Team ID (uses default team if not specified)")
|
|
433
|
-
}, async (params, extra) => {
|
|
434
|
-
const result = await boardsSprintsTools.getTeamMembers(params);
|
|
435
|
-
return {
|
|
436
|
-
content: result.content,
|
|
437
|
-
rawData: result.rawData,
|
|
438
|
-
isError: result.isError
|
|
439
|
-
};
|
|
440
|
-
});
|
|
441
|
-
allowedTools.has("getTeams") && server.tool("getTeams", "Get teams in the configured project. Use 'filter' to search by name.", {
|
|
442
|
-
filter: zod_1.z.string().optional().describe("Filter teams by name (case-insensitive substring match)"),
|
|
443
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of teams to return (default: 100)"),
|
|
444
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of teams to skip for pagination")
|
|
445
|
-
}, async (params, extra) => {
|
|
446
|
-
const result = await boardsSprintsTools.getTeams(params);
|
|
447
|
-
return {
|
|
448
|
-
content: result.content,
|
|
449
|
-
rawData: result.rawData,
|
|
450
|
-
isError: result.isError
|
|
451
|
-
};
|
|
452
|
-
});
|
|
453
|
-
// Register Project Tools
|
|
454
|
-
allowedTools.has("listProjects") && server.tool("listProjects", "List all projects", {
|
|
455
|
-
stateFilter: zod_1.z.enum(['all', 'createPending', 'deleted', 'deleting', 'new', 'unchanged', 'wellFormed']).optional().describe("Filter by project state"),
|
|
456
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of projects to return"),
|
|
457
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of projects to skip")
|
|
458
|
-
}, async (params, extra) => {
|
|
459
|
-
const result = await projectTools.listProjects(params);
|
|
460
|
-
return {
|
|
461
|
-
content: result.content,
|
|
462
|
-
rawData: result.rawData,
|
|
463
|
-
isError: result.isError
|
|
464
|
-
};
|
|
465
|
-
});
|
|
466
|
-
allowedTools.has("getProjectDetails") && server.tool("getProjectDetails", "Get details of a specific project", {
|
|
467
|
-
projectId: zod_1.z.string().describe("ID of the project"),
|
|
468
|
-
includeCapabilities: zod_1.z.boolean().optional().describe("Include project capabilities"),
|
|
469
|
-
includeHistory: zod_1.z.boolean().optional().describe("Include project history")
|
|
470
|
-
}, async (params, extra) => {
|
|
471
|
-
const result = await projectTools.getProjectDetails(params);
|
|
472
|
-
return {
|
|
473
|
-
content: result.content,
|
|
474
|
-
rawData: result.rawData,
|
|
475
|
-
isError: result.isError
|
|
476
|
-
};
|
|
477
|
-
});
|
|
478
|
-
allowedTools.has("createProject") && server.tool("createProject", "Create a new project", {
|
|
479
|
-
name: zod_1.z.string().describe("Name of the project"),
|
|
480
|
-
description: zod_1.z.string().optional().describe("Description of the project"),
|
|
481
|
-
visibility: zod_1.z.enum(['private', 'public']).optional().describe("Visibility of the project"),
|
|
482
|
-
capabilities: zod_1.z.record(zod_1.z.any()).optional().describe("Project capabilities"),
|
|
483
|
-
processTemplateId: zod_1.z.string().optional().describe("Process template ID")
|
|
484
|
-
}, async (params, extra) => {
|
|
485
|
-
const result = await projectTools.createProject(params);
|
|
486
|
-
return {
|
|
487
|
-
content: result.content,
|
|
488
|
-
rawData: result.rawData,
|
|
489
|
-
isError: result.isError
|
|
490
|
-
};
|
|
491
|
-
});
|
|
492
|
-
allowedTools.has("getAreas") && server.tool("getAreas", "Get area paths for a project. Use 'path' to drill into a subtree, or 'filter' to search by name.", {
|
|
493
|
-
projectId: zod_1.z.string().describe("ID or name of the project"),
|
|
494
|
-
path: zod_1.z.string().optional().describe("Area path to start from (e.g., 'TeamA\\SubArea'). Omit for root."),
|
|
495
|
-
depth: zod_1.z.coerce.number().optional().describe("Maximum depth of children to return (default: 2)"),
|
|
496
|
-
filter: zod_1.z.string().optional().describe("Filter areas by name (case-insensitive substring match)")
|
|
497
|
-
}, async (params, extra) => {
|
|
498
|
-
const result = await projectTools.getAreas(params);
|
|
499
|
-
return {
|
|
500
|
-
content: result.content,
|
|
501
|
-
rawData: result.rawData,
|
|
502
|
-
isError: result.isError
|
|
503
|
-
};
|
|
504
|
-
});
|
|
505
|
-
allowedTools.has("getIterations") && server.tool("getIterations", "Get iterations for a project. Use 'path' to drill into a subtree instead of fetching the entire hierarchy.", {
|
|
506
|
-
projectId: zod_1.z.string().describe("ID or name of the project"),
|
|
507
|
-
path: zod_1.z.string().optional().describe("Iteration path to start from (e.g., 'Sprint 1'). Omit for root."),
|
|
508
|
-
depth: zod_1.z.coerce.number().optional().describe("Maximum depth of children to return (default: 2)")
|
|
509
|
-
}, async (params, extra) => {
|
|
510
|
-
const result = await projectTools.getIterations(params);
|
|
511
|
-
return {
|
|
512
|
-
content: result.content,
|
|
513
|
-
rawData: result.rawData,
|
|
514
|
-
isError: result.isError
|
|
515
|
-
};
|
|
516
|
-
});
|
|
517
|
-
allowedTools.has("createArea") && server.tool("createArea", "Create a new area in a project", {
|
|
518
|
-
projectId: zod_1.z.string().describe("ID of the project"),
|
|
519
|
-
name: zod_1.z.string().describe("Name of the area"),
|
|
520
|
-
parentPath: zod_1.z.string().optional().describe("Path of the parent area")
|
|
521
|
-
}, async (params, extra) => {
|
|
522
|
-
const result = await projectTools.createArea(params);
|
|
523
|
-
return {
|
|
524
|
-
content: result.content,
|
|
525
|
-
rawData: result.rawData,
|
|
526
|
-
isError: result.isError
|
|
527
|
-
};
|
|
528
|
-
});
|
|
529
|
-
allowedTools.has("createIteration") && server.tool("createIteration", "Create a new iteration in a project", {
|
|
530
|
-
projectId: zod_1.z.string().describe("ID of the project"),
|
|
531
|
-
name: zod_1.z.string().describe("Name of the iteration"),
|
|
532
|
-
parentPath: zod_1.z.string().optional().describe("Path of the parent iteration"),
|
|
533
|
-
startDate: zod_1.z.string().optional().describe("Start date of the iteration"),
|
|
534
|
-
finishDate: zod_1.z.string().optional().describe("End date of the iteration")
|
|
535
|
-
}, async (params, extra) => {
|
|
536
|
-
const result = await projectTools.createIteration(params);
|
|
537
|
-
return {
|
|
538
|
-
content: result.content,
|
|
539
|
-
rawData: result.rawData,
|
|
540
|
-
isError: result.isError
|
|
541
|
-
};
|
|
542
|
-
});
|
|
543
|
-
allowedTools.has("getProcesses") && server.tool("getProcesses", "Get all processes", {
|
|
544
|
-
expandIcon: zod_1.z.boolean().optional().describe("Include process icons")
|
|
545
|
-
}, async (params, extra) => {
|
|
546
|
-
const result = await projectTools.getProcesses(params);
|
|
547
|
-
return {
|
|
548
|
-
content: result.content,
|
|
549
|
-
rawData: result.rawData,
|
|
550
|
-
isError: result.isError
|
|
551
|
-
};
|
|
552
|
-
});
|
|
553
|
-
allowedTools.has("getWorkItemTypes") && server.tool("getWorkItemTypes", "Get work item types for a process", {
|
|
554
|
-
processId: zod_1.z.string().describe("ID of the process")
|
|
555
|
-
}, async (params, extra) => {
|
|
556
|
-
const result = await projectTools.getWorkItemTypes(params);
|
|
557
|
-
return {
|
|
558
|
-
content: result.content,
|
|
559
|
-
rawData: result.rawData,
|
|
560
|
-
isError: result.isError
|
|
561
|
-
};
|
|
562
|
-
});
|
|
563
|
-
allowedTools.has("getWorkItemTypeFields") && server.tool("getWorkItemTypeFields", "Get fields for a work item type", {
|
|
564
|
-
processId: zod_1.z.string().describe("ID of the process"),
|
|
565
|
-
witRefName: zod_1.z.string().describe("Reference name of the work item type")
|
|
566
|
-
}, async (params, extra) => {
|
|
567
|
-
const result = await projectTools.getWorkItemTypeFields(params);
|
|
568
|
-
return {
|
|
569
|
-
content: result.content,
|
|
570
|
-
rawData: result.rawData,
|
|
571
|
-
isError: result.isError
|
|
572
|
-
};
|
|
573
|
-
});
|
|
574
|
-
// Register Git Tools
|
|
575
|
-
allowedTools.has("listRepositories") && server.tool("listRepositories", "Retrieve a list of all Git repositories within an Azure DevOps project. This tool returns repository details including ID, name, default branch, size, and URLs. Use projectId to scope to a specific project, or omit to use the default project from configuration.", {
|
|
576
|
-
projectId: zod_1.z.string().optional().describe("The project ID or name to filter repositories by. If omitted, uses the default project from configuration."),
|
|
577
|
-
includeHidden: zod_1.z.boolean().optional().describe("When set to true, includes repositories that have been marked as hidden. Default is false."),
|
|
578
|
-
includeAllUrls: zod_1.z.boolean().optional().describe("When set to true, includes all repository URLs (clone URLs, web URLs, etc.) in the response. Default is false.")
|
|
579
|
-
}, async (params, extra) => {
|
|
580
|
-
const result = await gitTools.listRepositories(params);
|
|
581
|
-
return {
|
|
582
|
-
content: result.content,
|
|
583
|
-
rawData: result.rawData,
|
|
584
|
-
isError: result.isError
|
|
585
|
-
};
|
|
586
|
-
});
|
|
587
|
-
allowedTools.has("getRepository") && server.tool("getRepository", "Fetch comprehensive details for a specific Git repository by its name or ID within a project. Returns repository metadata including name, project, size, default branch, remote URL, and web URL. Supports both repository names (e.g., 'MyProject') and repository IDs (GUIDs).", {
|
|
588
|
-
projectId: zod_1.z.string().describe("The project ID or name where the repository is located. Required to correctly scope the repository lookup."),
|
|
589
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) to retrieve details for. Repository names are case-insensitive and must be unique within the project.")
|
|
590
|
-
}, async (params, extra) => {
|
|
591
|
-
const result = await gitTools.getRepository(params);
|
|
592
|
-
return {
|
|
593
|
-
content: result.content,
|
|
594
|
-
rawData: result.rawData,
|
|
595
|
-
isError: result.isError
|
|
596
|
-
};
|
|
597
|
-
});
|
|
598
|
-
allowedTools.has("createRepository") && server.tool("createRepository", "Create a new Git repository in an Azure DevOps project. This tool initializes an empty repository with the specified name and returns the complete repository details including generated IDs and URLs.", {
|
|
599
|
-
name: zod_1.z.string().describe("The name to assign to the new repository. Must be unique within the project and should follow Git naming conventions."),
|
|
600
|
-
projectId: zod_1.z.string().describe("The project ID or name where the new repository should be created.")
|
|
601
|
-
}, async (params, extra) => {
|
|
602
|
-
const result = await gitTools.createRepository(params);
|
|
603
|
-
return {
|
|
604
|
-
content: result.content,
|
|
605
|
-
rawData: result.rawData,
|
|
606
|
-
isError: result.isError
|
|
607
|
-
};
|
|
608
|
-
});
|
|
609
|
-
allowedTools.has("listBranches") && server.tool("listBranches", "List all branches in a Git repository with optional name pattern filtering and pagination. Returns branch details including name, commit ID, and object ID. Results can be filtered using wildcards (e.g., 'feature/*' for all feature branches). Supports both repository names and IDs.", {
|
|
610
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) to list branches from. Repository names are case-insensitive."),
|
|
611
|
-
filter: zod_1.z.string().optional().describe("Optional wildcard pattern to filter branch names (e.g., 'feature/*', 'release/*'). Use this to narrow down results to specific branch types."),
|
|
612
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of branches to return in the response. Use this to limit large result sets, especially for repositories with many branches."),
|
|
613
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
614
|
-
}, async (params, extra) => {
|
|
615
|
-
const result = await gitTools.listBranches(params);
|
|
616
|
-
return {
|
|
617
|
-
content: result.content,
|
|
618
|
-
rawData: result.rawData,
|
|
619
|
-
isError: result.isError
|
|
620
|
-
};
|
|
621
|
-
});
|
|
622
|
-
allowedTools.has("searchCode") && server.tool("searchCode", "Search for files and code across repositories based on text content and file extensions. This performs a full-text search across repository contents. For best results, use specific search terms and optionally narrow the scope to a specific repository or file type.", {
|
|
623
|
-
searchText: zod_1.z.string().describe("The text content to search for within files. Can be code snippets, function names, or any text string."),
|
|
624
|
-
projectId: zod_1.z.string().optional().describe("Optional project ID or name to limit the search scope to a specific project. Omit to search across all accessible projects."),
|
|
625
|
-
repositoryId: zod_1.z.string().optional().describe("Optional repository ID or name to limit the search to a single repository. Most effective when combined with projectId."),
|
|
626
|
-
fileExtension: zod_1.z.string().optional().describe("Optional file extension to filter results by (e.g., '.js', '.ts', '.cs'). Provide without the dot to search for specific file types."),
|
|
627
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of search results to return. Use this to limit large result sets for common search terms.")
|
|
628
|
-
}, async (params, extra) => {
|
|
629
|
-
const result = await gitTools.searchCode(params);
|
|
630
|
-
return {
|
|
631
|
-
content: result.content,
|
|
632
|
-
rawData: result.rawData,
|
|
633
|
-
isError: result.isError
|
|
634
|
-
};
|
|
635
|
-
});
|
|
636
|
-
allowedTools.has("browseRepository") && server.tool("browseRepository", "Navigate and explore the file and folder structure within a Git repository, similar to a filesystem browser. Returns a list of items (files and folders) at the specified path. Optionally specify a branch, tag, or commit to browse repository content at a specific version. Supports both repository names and IDs.", {
|
|
637
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) to browse. Repository names are case-insensitive."),
|
|
638
|
-
path: zod_1.z.string().optional().describe("The folder path within the repository to browse (e.g., 'src/components'). Omit or use empty string to browse the repository root."),
|
|
639
|
-
versionDescriptor: zod_1.z.object({
|
|
640
|
-
version: zod_1.z.string().optional().describe("The name of the branch (e.g., 'main'), tag, or commit ID to browse. Defaults to the default branch if not specified."),
|
|
641
|
-
versionOptions: zod_1.z.string().optional().describe("Additional version options: 'None', 'PreviousChange', 'FirstParent'. Usually leave this undefined."),
|
|
642
|
-
versionType: zod_1.z.string().optional().describe("Type of version: 'Branch', 'Tag', 'Commit'. Usually inferred automatically from the version parameter.")
|
|
643
|
-
}).optional().describe("Optional specification for which version of the repository to browse. Use this to view files at a specific branch, tag, or commit."),
|
|
644
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
645
|
-
}, async (params, extra) => {
|
|
646
|
-
const result = await gitTools.browseRepository(params);
|
|
647
|
-
return {
|
|
648
|
-
content: result.content,
|
|
649
|
-
rawData: result.rawData,
|
|
650
|
-
isError: result.isError
|
|
651
|
-
};
|
|
652
|
-
});
|
|
653
|
-
allowedTools.has("getFileContent") && server.tool("getFileContent", "Retrieve the content of a specific file from a Git repository with line numbers (arrow notation) for easy LLM comprehension. Returns formatted content with comprehensive metadata including line ranges, file size, and truncation status. Content is automatically truncated to 200 lines or 8K characters (whichever comes first) for optimal context usage. Use startLine and lineCount parameters to retrieve specific ranges for large files. Optionally specify a branch, tag, or commit to retrieve file content from a specific version. Supports both repository names and IDs.", {
|
|
654
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the file. Repository names are case-insensitive."),
|
|
655
|
-
path: zod_1.z.string().describe("The full path to the file within the repository, including filename and extension (e.g., 'src/utils/helpers.js')."),
|
|
656
|
-
startLine: zod_1.z.coerce.number().optional().describe("Starting line number (1-based) to begin reading from. Default: 1. Use this to navigate through large files by requesting specific ranges (e.g., startLine=201 for lines starting at 201)."),
|
|
657
|
-
lineCount: zod_1.z.coerce.number().optional().describe("Number of lines to return starting from startLine. Default: all lines, Maximum: 200 lines per request. Use this with startLine to retrieve specific sections of large files (e.g., lineCount=100 to get 100 lines)."),
|
|
658
|
-
versionDescriptor: zod_1.z.object({
|
|
659
|
-
version: zod_1.z.string().optional().describe("The name of the branch (e.g., 'main'), tag, or commit ID to retrieve the file from. Defaults to the default branch if not specified."),
|
|
660
|
-
versionOptions: zod_1.z.string().optional().describe("Additional version options: 'None', 'PreviousChange', 'FirstParent'. Usually leave this undefined."),
|
|
661
|
-
versionType: zod_1.z.string().optional().describe("Type of version: 'Branch', 'Tag', 'Commit'. Usually inferred automatically from the version parameter.")
|
|
662
|
-
}).optional().describe("Optional specification for which version of the file to retrieve. Use this to view file content at a specific branch, tag, or commit."),
|
|
663
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
664
|
-
}, async (params, extra) => {
|
|
665
|
-
const result = await gitTools.getFileContent(params);
|
|
666
|
-
return {
|
|
667
|
-
content: result.content,
|
|
668
|
-
isError: result.isError
|
|
669
|
-
};
|
|
670
|
-
});
|
|
671
|
-
allowedTools.has("getCommitHistory") && server.tool("getCommitHistory", "Retrieve the commit history for a Git repository with metadata (ID, author, date, message, file changes). Returns a chronological list of commits with summary statistics at the top. Optionally filter to commits affecting a specific file path and use pagination to handle repositories with extensive history. Supports both repository names and IDs.", {
|
|
672
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) to get history for. Repository names are case-insensitive."),
|
|
673
|
-
itemPath: zod_1.z.string().optional().describe("Optional path to a specific file or folder to filter commits to only those that modified the specified path."),
|
|
674
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of commits to return in the response. Use this to limit results for repositories with extensive history."),
|
|
675
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of commits to skip before starting to return results. Use with 'top' for implementing pagination through commit history."),
|
|
676
|
-
projectId: zod_1.z.string().optional().describe("The project ID or name to filter repositories by. If omitted, uses the default project from configuration.")
|
|
677
|
-
}, async (params, extra) => {
|
|
678
|
-
const result = await gitTools.getCommitHistory(params);
|
|
679
|
-
return {
|
|
680
|
-
content: result.content,
|
|
681
|
-
rawData: result.rawData,
|
|
682
|
-
isError: result.isError,
|
|
683
|
-
structuredContent: result.structuredContent
|
|
684
|
-
};
|
|
685
|
-
});
|
|
686
|
-
allowedTools.has("listPullRequests") && server.tool("listPullRequests", "Retrieve a list of pull requests in a Git repository with comprehensive filtering options. Returns a concise table with PR details including ID, title, author, status, and branches, along with a summary of PRs by status. Filter by status, creator, or reviewer to find specific PRs. Supports both repository names and IDs. By default only active (open) PRs are returned.", {
|
|
687
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) to list pull requests from. Repository names are case-insensitive."),
|
|
688
|
-
status: zod_1.z.enum(['abandoned', 'active', 'all', 'completed', 'notSet']).optional().describe("Filter pull requests by their current status. Defaults to 'active' (open PRs). Use 'completed' for merged PRs, 'abandoned' for closed/rejected PRs, 'all' for all PRs regardless of status."),
|
|
689
|
-
creatorId: zod_1.z.string().optional().describe("Filter pull requests to only those created by a specific user ID or email address. Use 'creatorIds' for multiple developers."),
|
|
690
|
-
creatorIds: zod_1.z.array(zod_1.z.string()).optional().describe("Filter pull requests to those created by any of the specified user IDs or email addresses. Example: ['user1@example.com', 'user2@example.com']"),
|
|
691
|
-
reviewerId: zod_1.z.string().optional().describe("Filter pull requests to only those where a specific user ID or email address has been assigned as a reviewer."),
|
|
692
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of pull requests to return in the response. Use this for pagination to handle repositories with many PRs."),
|
|
693
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of pull requests to skip before starting to return results. Use with 'top' for implementing pagination."),
|
|
694
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
695
|
-
}, async (params, extra) => {
|
|
696
|
-
const result = await gitTools.listPullRequests(params);
|
|
697
|
-
return {
|
|
698
|
-
content: result.content,
|
|
699
|
-
isError: result.isError
|
|
700
|
-
};
|
|
701
|
-
});
|
|
702
|
-
allowedTools.has("createPullRequest") && server.tool("createPullRequest", "Create a new pull request in a Git repository to propose merging changes from a source branch into a target branch. The PR will track the differences between branches and allow for code review. Optionally provide a description and assign reviewers to the PR.", {
|
|
703
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) where the pull request will be created. Repository names are case-insensitive."),
|
|
704
|
-
sourceRefName: zod_1.z.string().describe("The name of the source branch containing the changes to be reviewed, in full reference format (e.g., 'refs/heads/feature/new-feature')."),
|
|
705
|
-
targetRefName: zod_1.z.string().describe("The name of the target branch where changes will be merged into, in full reference format (e.g., 'refs/heads/main')."),
|
|
706
|
-
title: zod_1.z.string().describe("A concise, descriptive title for the pull request that summarizes the changes being proposed."),
|
|
707
|
-
description: zod_1.z.string().optional().describe("A detailed description of the changes in the pull request. Can include markdown formatting for rich text, lists, code blocks, etc."),
|
|
708
|
-
reviewers: zod_1.z.array(zod_1.z.string()).optional().describe("An array of user IDs or email addresses to assign as reviewers to the pull request. These users will be notified about the PR."),
|
|
709
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
710
|
-
}, async (params, extra) => {
|
|
711
|
-
const result = await gitTools.createPullRequest(params);
|
|
712
|
-
return {
|
|
713
|
-
content: result.content,
|
|
714
|
-
rawData: result.rawData,
|
|
715
|
-
isError: result.isError
|
|
716
|
-
};
|
|
717
|
-
});
|
|
718
|
-
allowedTools.has("getPullRequest") && server.tool("getPullRequest", "Fetch details about a pull request. Returns a compact overview by default (metadata, truncated description, top reviewers, policy check status, work item IDs). " +
|
|
719
|
-
"Use 'include' to expand specific sections in full: " +
|
|
720
|
-
"'description' (full PR description text), " +
|
|
721
|
-
"'reviewers' (all reviewers with votes and required/optional status), " +
|
|
722
|
-
"'policies' (build validations, required reviewer checks, merge strategy checks — with pass/fail/running status), " +
|
|
723
|
-
"'workItems' (linked work items with title, type, state, assignee), " +
|
|
724
|
-
"'completionOptions' (merge strategy, delete branch, commit message), " +
|
|
725
|
-
"'files' (changed file list — prefer getAllPullRequestChanges for large diffs). " +
|
|
726
|
-
"Supports both repository names and IDs.", {
|
|
727
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
728
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to retrieve. This is the PR number shown in the Azure DevOps UI (e.g., PR #123)."),
|
|
729
|
-
include: zod_1.z.array(zod_1.z.enum(['policies', 'description', 'reviewers', 'workItems', 'completionOptions', 'files'])).optional().describe("Sections to return in full detail. When omitted, returns compact overview with all sections truncated. Specify sections you need full data for."),
|
|
730
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
731
|
-
}, async (params, extra) => {
|
|
732
|
-
const result = await gitTools.getPullRequest(params);
|
|
733
|
-
return {
|
|
734
|
-
content: result.content,
|
|
735
|
-
rawData: result.rawData,
|
|
736
|
-
isError: result.isError
|
|
737
|
-
};
|
|
738
|
-
});
|
|
739
|
-
allowedTools.has("getPullRequestComments") && server.tool("getPullRequestComments", "Retrieve all comment threads and associated comments for a pull request. Returns a summary and organized list of threads including code review comments (with file/line context) and general discussions. Optionally filter by thread status (e.g., only 'active' unresolved threads), author name, specific thread ID, or use pagination. Supports both repository names and IDs.", {
|
|
740
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
741
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to retrieve comments from. This is the PR number shown in the Azure DevOps UI."),
|
|
742
|
-
threadId: zIdOptional().describe("Optional ID of a specific comment thread to retrieve. If provided, only returns the specified thread rather than all threads."),
|
|
743
|
-
status: zod_1.z.enum(['active', 'fixed', 'wontFix', 'closed', 'byDesign', 'pending']).optional().describe("Filter threads by status. Use 'active' to see only unresolved threads, 'fixed' for resolved ones, etc."),
|
|
744
|
-
authorName: zod_1.z.string().optional().describe("Filter threads by author display name or email (case-insensitive partial match). Only threads where the root comment was authored by a matching user are returned."),
|
|
745
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of comment threads to return in the response. Use this for pagination in PRs with many comments."),
|
|
746
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of comment threads to skip before starting to return results. Use with 'top' for implementing pagination."),
|
|
747
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
748
|
-
}, async (params, extra) => {
|
|
749
|
-
const result = await gitTools.getPullRequestComments(params);
|
|
750
|
-
return {
|
|
751
|
-
content: result.content,
|
|
752
|
-
rawData: result.rawData,
|
|
753
|
-
isError: result.isError,
|
|
754
|
-
structuredContent: result.structuredContent
|
|
755
|
-
};
|
|
756
|
-
});
|
|
757
|
-
allowedTools.has("approvePullRequest") && server.tool("approvePullRequest", "Cast an 'Approve' vote on a pull request on behalf of the current authenticated user. This marks the PR as approved by the user and contributes toward satisfying approval requirements defined in branch policies. Equivalent to clicking 'Approve' in the Azure DevOps UI. Supports both repository names and IDs.", {
|
|
758
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
759
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to approve. This is the PR number shown in the Azure DevOps UI (e.g., PR #123)."),
|
|
760
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
761
|
-
}, async (params, extra) => {
|
|
762
|
-
const result = await gitTools.approvePullRequest(params);
|
|
763
|
-
return {
|
|
764
|
-
content: result.content,
|
|
765
|
-
rawData: result.rawData,
|
|
766
|
-
isError: result.isError
|
|
767
|
-
};
|
|
768
|
-
});
|
|
769
|
-
allowedTools.has("mergePullRequest") && server.tool("mergePullRequest", "Complete a pull request by merging the source branch changes into the target branch. This operation requires that all required reviewers have approved the PR and all branch policies are satisfied. Supports different merge strategies (squash, rebase, etc.) and allows adding a custom commit message. Supports both repository names and IDs.", {
|
|
770
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
771
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to merge. This is the PR number shown in the Azure DevOps UI (e.g., PR #123)."),
|
|
772
|
-
mergeStrategy: zod_1.z.enum(['noFastForward', 'rebase', 'rebaseMerge', 'squash']).optional().describe("The strategy to use when merging changes: 'noFastForward' creates a merge commit, 'rebase' updates the source branch commits onto the target branch, 'rebaseMerge' combines rebase with a merge commit, 'squash' combines all changes into a single commit."),
|
|
773
|
-
comment: zod_1.z.string().optional().describe("Optional comment to include in the merge commit message. Use this to provide additional context about the merge beyond the default message."),
|
|
774
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
775
|
-
}, async (params, extra) => {
|
|
776
|
-
const result = await gitTools.mergePullRequest(params);
|
|
777
|
-
return {
|
|
778
|
-
content: result.content,
|
|
779
|
-
rawData: result.rawData,
|
|
780
|
-
isError: result.isError
|
|
781
|
-
};
|
|
782
|
-
});
|
|
783
|
-
// Register new Pull Request Comment Tools
|
|
784
|
-
allowedTools.has("addPullRequestInlineComment") && server.tool("addPullRequestInlineComment", "Add an inline code comment anchored to a SPECIFIC LINE of code in a file. The comment appears directly on that line in the Files tab. WHEN TO USE: Point out specific code issues, suggest improvements to a particular line, or ask questions about specific implementation details. EXAMPLES: 'This variable should be null-checked here', 'Consider using async/await on line 45', 'Why is this hardcoded?'. The system automatically retrieves the correct change tracking ID from the PR diff.", {
|
|
785
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
786
|
-
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."),
|
|
787
|
-
comment: zod_1.z.string().describe("The text content of the comment. Supports full markdown (headers, lists, code blocks, bold, etc.). IMPORTANT: Use actual newline characters in the JSON string for line breaks — do NOT send literal backslash-n text. Example: \"## Issue\\n\\nMissing null check\" where \\n is a real JSON newline escape."),
|
|
788
|
-
position: zod_1.z.object({
|
|
789
|
-
line: zod_1.z.coerce.number().describe("The 1-based line number in the file where the comment starts. Must be a line visible in the PR diff (added, removed, or context line)."),
|
|
790
|
-
offset: zod_1.z.coerce.number().describe("The character offset within the start line. Typically use 1 for beginning of line."),
|
|
791
|
-
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."),
|
|
792
|
-
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.")
|
|
793
|
-
}).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."),
|
|
794
|
-
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')."),
|
|
795
|
-
format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering."),
|
|
796
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
797
|
-
}, async (params, extra) => {
|
|
798
|
-
const result = await gitTools.addPullRequestInlineComment(params);
|
|
799
|
-
return {
|
|
800
|
-
content: result.content,
|
|
801
|
-
rawData: result.rawData,
|
|
802
|
-
isError: result.isError
|
|
803
|
-
};
|
|
804
|
-
});
|
|
805
|
-
allowedTools.has("addPullRequestFileComment") && server.tool("addPullRequestFileComment", "Add a comment about an ENTIRE FILE (not a specific line). The comment appears at the file level in the Files tab. WHEN TO USE: Discuss overall file structure, architecture decisions, naming conventions, or when feedback applies to the whole file. EXAMPLES: 'This file should be split into smaller modules', 'Consider moving this to a different namespace', 'Great refactoring of this entire service!', 'This file needs unit tests'.", {
|
|
806
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
807
|
-
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."),
|
|
808
|
-
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')."),
|
|
809
|
-
comment: zod_1.z.string().describe("The text content of the comment about the entire file. Supports full markdown (headers, lists, code blocks, bold, etc.). IMPORTANT: Use actual newline characters in the JSON string for line breaks — do NOT send literal backslash-n text. Example: \"## Summary\\n\\nThis file needs refactoring\" where \\n is a real JSON newline escape."),
|
|
810
|
-
format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering."),
|
|
811
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
812
|
-
}, async (params, extra) => {
|
|
813
|
-
const result = await gitTools.addPullRequestFileComment(params);
|
|
814
|
-
return {
|
|
815
|
-
content: result.content,
|
|
816
|
-
rawData: result.rawData,
|
|
817
|
-
isError: result.isError
|
|
818
|
-
};
|
|
819
|
-
});
|
|
820
|
-
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'.", {
|
|
821
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
822
|
-
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."),
|
|
823
|
-
comment: zod_1.z.string().describe("The text content of the general comment about the PR. Supports full markdown (headers, lists, code blocks, bold, etc.). IMPORTANT: Use actual newline characters in the JSON string for line breaks — do NOT send literal backslash-n text. Example: \"## Review Summary\\n\\n- Looks good\\n- One issue found\" where \\n is a real JSON newline escape."),
|
|
824
|
-
format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering."),
|
|
825
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
826
|
-
}, async (params, extra) => {
|
|
827
|
-
const result = await gitTools.addPullRequestComment(params);
|
|
828
|
-
return {
|
|
829
|
-
content: result.content,
|
|
830
|
-
rawData: result.rawData,
|
|
831
|
-
isError: result.isError
|
|
832
|
-
};
|
|
833
|
-
});
|
|
834
|
-
// Register new Pull Request Diff Tools
|
|
835
|
-
allowedTools.has("getPullRequestFileChanges") && server.tool("getPullRequestFileChanges", "Retrieve detailed file diff information for a specific file changed within a pull request. Returns change metadata including change type (add, edit, delete), before/after content identifiers, and file path information. Optionally filter to a specific file path.", {
|
|
836
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
837
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to examine. This is the PR number shown in the Azure DevOps UI."),
|
|
838
|
-
path: zod_1.z.string().optional().describe("Optional path to a specific file to return changes for. If omitted, changes for all files will be returned but filtered to match this specific path."),
|
|
839
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
840
|
-
}, async (params, extra) => {
|
|
841
|
-
const result = await gitTools.getPullRequestFileChanges(params);
|
|
842
|
-
return {
|
|
843
|
-
content: result.content,
|
|
844
|
-
rawData: result.rawData,
|
|
845
|
-
isError: result.isError
|
|
846
|
-
};
|
|
847
|
-
});
|
|
848
|
-
allowedTools.has("getPullRequestChangesCount") && server.tool("getPullRequestChangesCount", "Get statistical summary of changes in a pull request, including total count of files changed and breakdowns by change type (added, modified, deleted). Useful for understanding the scope of changes in a PR at a glance.", {
|
|
849
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
850
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to analyze. This is the PR number shown in the Azure DevOps UI."),
|
|
851
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
852
|
-
}, async (params, extra) => {
|
|
853
|
-
const result = await gitTools.getPullRequestChangesCount(params);
|
|
854
|
-
return {
|
|
855
|
-
content: result.content,
|
|
856
|
-
rawData: result.rawData,
|
|
857
|
-
isError: result.isError
|
|
858
|
-
};
|
|
859
|
-
});
|
|
860
|
-
allowedTools.has("getAllPullRequestChanges") && server.tool("getAllPullRequestChanges", "Retrieve a comprehensive list of all file changes in a pull request with pagination support. Returns a summary and table of changed files with change types. Use pagination parameters (top/skip) to handle large PRs with many file changes. This does NOT include diff content - use getPullRequestFileChanges for detailed diffs.", {
|
|
861
|
-
repository: zod_1.z.string().describe("The repository name (e.g., 'MyProject') or ID (GUID) containing the pull request. Repository names are case-insensitive."),
|
|
862
|
-
pullRequestId: zId().describe("The numeric ID of the pull request to retrieve changes for. This is the PR number shown in the Azure DevOps UI."),
|
|
863
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of change entries to return in a single request. Use this for pagination to avoid large response payloads."),
|
|
864
|
-
skip: zod_1.z.coerce.number().optional().describe("Number of change entries to skip before starting to return results. Use with 'top' for implementing pagination."),
|
|
865
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project.")
|
|
866
|
-
}, async (params, extra) => {
|
|
867
|
-
const result = await gitTools.getAllPullRequestChanges(params);
|
|
868
|
-
return {
|
|
869
|
-
content: result.content,
|
|
870
|
-
rawData: result.rawData,
|
|
871
|
-
isError: result.isError,
|
|
872
|
-
structuredContent: result.structuredContent
|
|
873
|
-
};
|
|
874
|
-
});
|
|
875
|
-
allowedTools.has("updatePullRequest") && server.tool("updatePullRequest", "Update pull request properties (title, description, status, auto-complete, draft mode, target branch)", {
|
|
876
|
-
repository: zod_1.z.string().describe("Repository name or ID"),
|
|
877
|
-
pullRequestId: zId().describe("Pull request ID"),
|
|
878
|
-
title: zod_1.z.string().optional().describe("New title for the PR"),
|
|
879
|
-
description: zod_1.z.string().optional().describe("New description for the PR"),
|
|
880
|
-
status: zod_1.z.enum(['active', 'abandoned', 'completed']).optional().describe("New status"),
|
|
881
|
-
autoCompleteSetBy: zod_1.z.string().optional().describe("User ID to set as auto-complete initiator"),
|
|
882
|
-
mergeStrategy: zod_1.z.enum(['noFastForward', 'rebase', 'rebaseMerge', 'squash']).optional().describe("Merge strategy for auto-complete"),
|
|
883
|
-
deleteSourceBranch: zod_1.z.boolean().optional().describe("Delete source branch on completion"),
|
|
884
|
-
isDraft: zod_1.z.boolean().optional().describe("Set PR as draft or publish it"),
|
|
885
|
-
targetRefName: zod_1.z.string().optional().describe("Change target branch (e.g., 'refs/heads/main')"),
|
|
886
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
887
|
-
}, async (params) => {
|
|
888
|
-
const result = await gitTools.updatePullRequest(params);
|
|
889
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
890
|
-
});
|
|
891
|
-
allowedTools.has("updatePullRequestReviewers") && server.tool("updatePullRequestReviewers", "Add or remove reviewers on an existing pull request", {
|
|
892
|
-
repository: zod_1.z.string().describe("Repository name or ID"),
|
|
893
|
-
pullRequestId: zId().describe("Pull request ID"),
|
|
894
|
-
reviewersToAdd: zod_1.z.array(zod_1.z.string()).optional().describe("User IDs or email addresses to add as reviewers"),
|
|
895
|
-
reviewersToRemove: zod_1.z.array(zod_1.z.string()).optional().describe("User IDs or email addresses to remove from reviewers"),
|
|
896
|
-
makeRequired: zod_1.z.boolean().optional().describe("Make added reviewers required (default false)"),
|
|
897
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
898
|
-
}, async (params) => {
|
|
899
|
-
const result = await gitTools.updatePullRequestReviewers(params);
|
|
900
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
901
|
-
});
|
|
902
|
-
allowedTools.has("replyToComment") && server.tool("replyToComment", "Reply to an existing comment thread on a pull request", {
|
|
903
|
-
repository: zod_1.z.string().describe("Repository name or ID"),
|
|
904
|
-
pullRequestId: zId().describe("Pull request ID"),
|
|
905
|
-
threadId: zId().describe("Thread ID to reply to"),
|
|
906
|
-
comment: zod_1.z.string().describe("Reply text content. Supports full markdown. IMPORTANT: Use actual newline characters in the JSON string for line breaks — do NOT send literal backslash-n text."),
|
|
907
|
-
format: zod_1.z.enum(['markdown', 'html']).optional().describe("Content format: 'markdown' (default) or 'html'. When markdown, HTML entities are unescaped for correct rendering."),
|
|
908
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
909
|
-
}, async (params) => {
|
|
910
|
-
const result = await gitTools.replyToComment(params);
|
|
911
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
912
|
-
});
|
|
913
|
-
allowedTools.has("updatePullRequestThread") && server.tool("updatePullRequestThread", "Update a comment thread's status (resolve, reactivate, close, etc.)", {
|
|
914
|
-
repository: zod_1.z.string().describe("Repository name or ID"),
|
|
915
|
-
pullRequestId: zId().describe("Pull request ID"),
|
|
916
|
-
threadId: zId().describe("Thread ID to update"),
|
|
917
|
-
status: zod_1.z.enum(['active', 'byDesign', 'closed', 'fixed', 'pending', 'unknown', 'wontFix']).describe("New thread status"),
|
|
918
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
919
|
-
}, async (params) => {
|
|
920
|
-
const result = await gitTools.updatePullRequestThread(params);
|
|
921
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
922
|
-
});
|
|
923
|
-
allowedTools.has("createBranch") && server.tool("createBranch", "Create a new branch from a source branch name or commit SHA", {
|
|
924
|
-
repository: zod_1.z.string().describe("Repository name or ID"),
|
|
925
|
-
branchName: zod_1.z.string().describe("New branch name (e.g., 'feature/my-feature')"),
|
|
926
|
-
sourceRef: zod_1.z.string().describe("Source branch name (e.g., 'main') or commit SHA to branch from"),
|
|
927
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
928
|
-
}, async (params) => {
|
|
929
|
-
const result = await gitTools.createBranch(params);
|
|
930
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
931
|
-
});
|
|
932
|
-
// Register Testing Capabilities Tools
|
|
933
|
-
allowedTools.has("runAutomatedTests") && server.tool("runAutomatedTests", "Execute automated test suites", {
|
|
934
|
-
testSuiteId: zIdOptional().describe("ID of the test suite to run"),
|
|
935
|
-
testPlanId: zIdOptional().describe("ID of the test plan to run"),
|
|
936
|
-
testEnvironment: zod_1.z.string().optional().describe("Environment to run tests in"),
|
|
937
|
-
parallelExecution: zod_1.z.boolean().optional().describe("Whether to run tests in parallel")
|
|
938
|
-
}, async (params, extra) => {
|
|
939
|
-
const result = await testingCapabilitiesTools.runAutomatedTests(params);
|
|
940
|
-
return {
|
|
941
|
-
content: result.content,
|
|
942
|
-
rawData: result.rawData,
|
|
943
|
-
isError: result.isError
|
|
944
|
-
};
|
|
945
|
-
});
|
|
946
|
-
allowedTools.has("getTestAutomationStatus") && server.tool("getTestAutomationStatus", "Check status of automated test execution", {
|
|
947
|
-
testRunId: zId().describe("ID of the test run to check status for")
|
|
948
|
-
}, async (params, extra) => {
|
|
949
|
-
const result = await testingCapabilitiesTools.getTestAutomationStatus(params);
|
|
950
|
-
return {
|
|
951
|
-
content: result.content,
|
|
952
|
-
rawData: result.rawData,
|
|
953
|
-
isError: result.isError
|
|
954
|
-
};
|
|
955
|
-
});
|
|
956
|
-
allowedTools.has("configureTestAgents") && server.tool("configureTestAgents", "Configure and manage test agents", {
|
|
957
|
-
agentName: zod_1.z.string().describe("Name of the test agent to configure"),
|
|
958
|
-
capabilities: zod_1.z.record(zod_1.z.any()).optional().describe("Capabilities to set for the agent"),
|
|
959
|
-
enabled: zod_1.z.boolean().optional().describe("Whether the agent should be enabled")
|
|
960
|
-
}, async (params, extra) => {
|
|
961
|
-
const result = await testingCapabilitiesTools.configureTestAgents(params);
|
|
962
|
-
return {
|
|
963
|
-
content: result.content,
|
|
964
|
-
rawData: result.rawData,
|
|
965
|
-
isError: result.isError
|
|
966
|
-
};
|
|
967
|
-
});
|
|
968
|
-
allowedTools.has("createTestDataGenerator") && server.tool("createTestDataGenerator", "Generate test data for automated tests", {
|
|
969
|
-
name: zod_1.z.string().describe("Name of the test data generator"),
|
|
970
|
-
dataSchema: zod_1.z.record(zod_1.z.any()).describe("Schema for the test data to generate"),
|
|
971
|
-
recordCount: zod_1.z.coerce.number().optional().describe("Number of records to generate")
|
|
972
|
-
}, async (params, extra) => {
|
|
973
|
-
const result = await testingCapabilitiesTools.createTestDataGenerator(params);
|
|
974
|
-
return {
|
|
975
|
-
content: result.content,
|
|
976
|
-
rawData: result.rawData,
|
|
977
|
-
isError: result.isError
|
|
978
|
-
};
|
|
979
|
-
});
|
|
980
|
-
allowedTools.has("manageTestEnvironments") && server.tool("manageTestEnvironments", "Manage test environments for different test types", {
|
|
981
|
-
environmentName: zod_1.z.string().describe("Name of the test environment"),
|
|
982
|
-
action: zod_1.z.enum(['create', 'update', 'delete']).describe("Action to perform"),
|
|
983
|
-
properties: zod_1.z.record(zod_1.z.any()).optional().describe("Properties for the environment")
|
|
984
|
-
}, async (params, extra) => {
|
|
985
|
-
const result = await testingCapabilitiesTools.manageTestEnvironments(params);
|
|
986
|
-
return {
|
|
987
|
-
content: result.content,
|
|
988
|
-
rawData: result.rawData,
|
|
989
|
-
isError: result.isError
|
|
990
|
-
};
|
|
991
|
-
});
|
|
992
|
-
allowedTools.has("getTestFlakiness") && server.tool("getTestFlakiness", "Analyze and report on test flakiness", {
|
|
993
|
-
testId: zIdOptional().describe("ID of a specific test to analyze"),
|
|
994
|
-
testRunIds: zIdArray().optional().describe("Specific test runs to analyze"),
|
|
995
|
-
timeRange: zod_1.z.string().optional().describe("Time range for analysis (e.g., '30d')")
|
|
996
|
-
}, async (params, extra) => {
|
|
997
|
-
const result = await testingCapabilitiesTools.getTestFlakiness(params);
|
|
998
|
-
return {
|
|
999
|
-
content: result.content,
|
|
1000
|
-
rawData: result.rawData,
|
|
1001
|
-
isError: result.isError
|
|
1002
|
-
};
|
|
1003
|
-
});
|
|
1004
|
-
allowedTools.has("getTestGapAnalysis") && server.tool("getTestGapAnalysis", "Identify gaps in test coverage", {
|
|
1005
|
-
areaPath: zod_1.z.string().optional().describe("Area path to analyze"),
|
|
1006
|
-
codeChangesOnly: zod_1.z.boolean().optional().describe("Only analyze recent code changes")
|
|
1007
|
-
}, async (params, extra) => {
|
|
1008
|
-
const result = await testingCapabilitiesTools.getTestGapAnalysis(params);
|
|
1009
|
-
return {
|
|
1010
|
-
content: result.content,
|
|
1011
|
-
rawData: result.rawData,
|
|
1012
|
-
isError: result.isError
|
|
1013
|
-
};
|
|
1014
|
-
});
|
|
1015
|
-
allowedTools.has("runTestImpactAnalysis") && server.tool("runTestImpactAnalysis", "Determine which tests to run based on code changes", {
|
|
1016
|
-
buildId: zId().describe("ID of the build to analyze"),
|
|
1017
|
-
changedFiles: zod_1.z.array(zod_1.z.string()).optional().describe("List of changed files")
|
|
1018
|
-
}, async (params, extra) => {
|
|
1019
|
-
const result = await testingCapabilitiesTools.runTestImpactAnalysis(params);
|
|
1020
|
-
return {
|
|
1021
|
-
content: result.content,
|
|
1022
|
-
rawData: result.rawData,
|
|
1023
|
-
isError: result.isError
|
|
1024
|
-
};
|
|
1025
|
-
});
|
|
1026
|
-
allowedTools.has("getTestHealthDashboard") && server.tool("getTestHealthDashboard", "View overall test health metrics", {
|
|
1027
|
-
timeRange: zod_1.z.string().optional().describe("Time range for metrics (e.g., '90d')"),
|
|
1028
|
-
includeTrends: zod_1.z.boolean().optional().describe("Include trend data")
|
|
1029
|
-
}, async (params, extra) => {
|
|
1030
|
-
const result = await testingCapabilitiesTools.getTestHealthDashboard(params);
|
|
1031
|
-
return {
|
|
1032
|
-
content: result.content,
|
|
1033
|
-
rawData: result.rawData,
|
|
1034
|
-
isError: result.isError
|
|
1035
|
-
};
|
|
1036
|
-
});
|
|
1037
|
-
allowedTools.has("runTestOptimization") && server.tool("runTestOptimization", "Optimize test suite execution for faster feedback", {
|
|
1038
|
-
testPlanId: zId().describe("ID of the test plan to optimize"),
|
|
1039
|
-
optimizationGoal: zod_1.z.enum(['time', 'coverage', 'reliability']).describe("Optimization goal")
|
|
1040
|
-
}, async (params, extra) => {
|
|
1041
|
-
const result = await testingCapabilitiesTools.runTestOptimization(params);
|
|
1042
|
-
return {
|
|
1043
|
-
content: result.content,
|
|
1044
|
-
rawData: result.rawData,
|
|
1045
|
-
isError: result.isError
|
|
1046
|
-
};
|
|
1047
|
-
});
|
|
1048
|
-
allowedTools.has("createExploratorySessions") && server.tool("createExploratorySessions", "Create new exploratory testing sessions", {
|
|
1049
|
-
title: zod_1.z.string().describe("Title of the exploratory session"),
|
|
1050
|
-
description: zod_1.z.string().optional().describe("Description of the session"),
|
|
1051
|
-
areaPath: zod_1.z.string().optional().describe("Area path for the session")
|
|
1052
|
-
}, async (params, extra) => {
|
|
1053
|
-
const result = await testingCapabilitiesTools.createExploratorySessions(params);
|
|
1054
|
-
return {
|
|
1055
|
-
content: result.content,
|
|
1056
|
-
rawData: result.rawData,
|
|
1057
|
-
isError: result.isError
|
|
1058
|
-
};
|
|
1059
|
-
});
|
|
1060
|
-
allowedTools.has("recordExploratoryTestResults") && server.tool("recordExploratoryTestResults", "Record findings during exploratory testing", {
|
|
1061
|
-
sessionId: zId().describe("ID of the exploratory session"),
|
|
1062
|
-
findings: zod_1.z.array(zod_1.z.string()).describe("List of findings to record"),
|
|
1063
|
-
attachments: zod_1.z.array(zod_1.z.object({
|
|
1064
|
-
name: zod_1.z.string().describe("Name of the attachment"),
|
|
1065
|
-
content: zod_1.z.string().describe("Base64 encoded content of the attachment"),
|
|
1066
|
-
contentType: zod_1.z.string().optional().describe("MIME type of the attachment")
|
|
1067
|
-
})).optional().describe("Attachments for the findings")
|
|
1068
|
-
}, async (params, extra) => {
|
|
1069
|
-
const result = await testingCapabilitiesTools.recordExploratoryTestResults(params);
|
|
1070
|
-
return {
|
|
1071
|
-
content: result.content,
|
|
1072
|
-
rawData: result.rawData,
|
|
1073
|
-
isError: result.isError
|
|
1074
|
-
};
|
|
1075
|
-
});
|
|
1076
|
-
allowedTools.has("convertFindingsToWorkItems") && server.tool("convertFindingsToWorkItems", "Convert exploratory test findings to work items", {
|
|
1077
|
-
sessionId: zId().describe("ID of the exploratory session"),
|
|
1078
|
-
findingIds: zIdArray().describe("IDs of findings to convert"),
|
|
1079
|
-
workItemType: zod_1.z.string().optional().describe("Type of work item to create")
|
|
1080
|
-
}, async (params, extra) => {
|
|
1081
|
-
const result = await testingCapabilitiesTools.convertFindingsToWorkItems(params);
|
|
1082
|
-
return {
|
|
1083
|
-
content: result.content,
|
|
1084
|
-
rawData: result.rawData,
|
|
1085
|
-
isError: result.isError
|
|
1086
|
-
};
|
|
1087
|
-
});
|
|
1088
|
-
allowedTools.has("getExploratoryTestStatistics") && server.tool("getExploratoryTestStatistics", "Get statistics on exploratory testing activities", {
|
|
1089
|
-
timeRange: zod_1.z.string().optional().describe("Time range for statistics (e.g., '90d')"),
|
|
1090
|
-
userId: zod_1.z.string().optional().describe("Filter by specific user")
|
|
1091
|
-
}, async (params, extra) => {
|
|
1092
|
-
const result = await testingCapabilitiesTools.getExploratoryTestStatistics(params);
|
|
1093
|
-
return {
|
|
1094
|
-
content: result.content,
|
|
1095
|
-
rawData: result.rawData,
|
|
1096
|
-
isError: result.isError
|
|
1097
|
-
};
|
|
1098
|
-
});
|
|
1099
|
-
// Register DevSecOps Tools
|
|
1100
|
-
allowedTools.has("runSecurityScan") && server.tool("runSecurityScan", "Run security scans on repositories. Supports both repository names and IDs.", {
|
|
1101
|
-
repository: zod_1.z.string().describe("Repository name (e.g., 'MyProject') or ID (GUID) to scan. Repository names are case-insensitive."),
|
|
1102
|
-
branch: zod_1.z.string().optional().describe("Branch to scan"),
|
|
1103
|
-
scanType: zod_1.z.enum(['static', 'dynamic', 'container', 'dependency', 'all']).optional().describe("Type of security scan to run")
|
|
1104
|
-
}, async (params, extra) => {
|
|
1105
|
-
const result = await devSecOpsTools.runSecurityScan(params);
|
|
1106
|
-
return {
|
|
1107
|
-
content: result.content,
|
|
1108
|
-
rawData: result.rawData,
|
|
1109
|
-
isError: result.isError
|
|
1110
|
-
};
|
|
1111
|
-
});
|
|
1112
|
-
allowedTools.has("getSecurityScanResults") && server.tool("getSecurityScanResults", "Get results from security scans", {
|
|
1113
|
-
scanId: zod_1.z.string().describe("ID of the scan to get results for"),
|
|
1114
|
-
severity: zod_1.z.enum(['critical', 'high', 'medium', 'low', 'all']).optional().describe("Filter results by severity")
|
|
1115
|
-
}, async (params, extra) => {
|
|
1116
|
-
const result = await devSecOpsTools.getSecurityScanResults(params);
|
|
1117
|
-
return {
|
|
1118
|
-
content: result.content,
|
|
1119
|
-
rawData: result.rawData,
|
|
1120
|
-
isError: result.isError
|
|
1121
|
-
};
|
|
1122
|
-
});
|
|
1123
|
-
allowedTools.has("trackSecurityVulnerabilities") && server.tool("trackSecurityVulnerabilities", "Track and manage security vulnerabilities", {
|
|
1124
|
-
vulnerabilityId: zod_1.z.string().optional().describe("ID of a specific vulnerability to track"),
|
|
1125
|
-
status: zod_1.z.enum(['open', 'in-progress', 'mitigated', 'resolved', 'false-positive']).optional().describe("Filter by vulnerability status"),
|
|
1126
|
-
timeRange: zod_1.z.string().optional().describe("Time range for tracking (e.g., '90d')")
|
|
1127
|
-
}, async (params, extra) => {
|
|
1128
|
-
const result = await devSecOpsTools.trackSecurityVulnerabilities(params);
|
|
1129
|
-
return {
|
|
1130
|
-
content: result.content,
|
|
1131
|
-
rawData: result.rawData,
|
|
1132
|
-
isError: result.isError
|
|
1133
|
-
};
|
|
1134
|
-
});
|
|
1135
|
-
allowedTools.has("generateSecurityCompliance") && server.tool("generateSecurityCompliance", "Generate security compliance reports", {
|
|
1136
|
-
standardType: zod_1.z.enum(['owasp', 'pci-dss', 'hipaa', 'gdpr', 'iso27001', 'custom']).optional().describe("Compliance standard to report on"),
|
|
1137
|
-
includeEvidence: zod_1.z.boolean().optional().describe("Include evidence in the report")
|
|
1138
|
-
}, async (params, extra) => {
|
|
1139
|
-
const result = await devSecOpsTools.generateSecurityCompliance(params);
|
|
1140
|
-
return {
|
|
1141
|
-
content: result.content,
|
|
1142
|
-
rawData: result.rawData,
|
|
1143
|
-
isError: result.isError
|
|
1144
|
-
};
|
|
1145
|
-
});
|
|
1146
|
-
allowedTools.has("integrateSarifResults") && server.tool("integrateSarifResults", "Import and process SARIF format security results", {
|
|
1147
|
-
sarifFilePath: zod_1.z.string().describe("Path to the SARIF file to import"),
|
|
1148
|
-
createWorkItems: zod_1.z.boolean().optional().describe("Create work items from findings")
|
|
1149
|
-
}, async (params, extra) => {
|
|
1150
|
-
const result = await devSecOpsTools.integrateSarifResults(params);
|
|
1151
|
-
return {
|
|
1152
|
-
content: result.content,
|
|
1153
|
-
rawData: result.rawData,
|
|
1154
|
-
isError: result.isError
|
|
1155
|
-
};
|
|
1156
|
-
});
|
|
1157
|
-
allowedTools.has("runComplianceChecks") && server.tool("runComplianceChecks", "Run compliance checks against standards", {
|
|
1158
|
-
complianceStandard: zod_1.z.string().describe("Compliance standard to check against"),
|
|
1159
|
-
scopeId: zod_1.z.string().optional().describe("Scope of the compliance check")
|
|
1160
|
-
}, async (params, extra) => {
|
|
1161
|
-
const result = await devSecOpsTools.runComplianceChecks(params);
|
|
1162
|
-
return {
|
|
1163
|
-
content: result.content,
|
|
1164
|
-
rawData: result.rawData,
|
|
1165
|
-
isError: result.isError
|
|
1166
|
-
};
|
|
1167
|
-
});
|
|
1168
|
-
allowedTools.has("getComplianceStatus") && server.tool("getComplianceStatus", "Get current compliance status", {
|
|
1169
|
-
standardId: zod_1.z.string().optional().describe("ID of the compliance standard"),
|
|
1170
|
-
includeHistory: zod_1.z.boolean().optional().describe("Include historical compliance data")
|
|
1171
|
-
}, async (params, extra) => {
|
|
1172
|
-
const result = await devSecOpsTools.getComplianceStatus(params);
|
|
1173
|
-
return {
|
|
1174
|
-
content: result.content,
|
|
1175
|
-
rawData: result.rawData,
|
|
1176
|
-
isError: result.isError
|
|
1177
|
-
};
|
|
1178
|
-
});
|
|
1179
|
-
allowedTools.has("createComplianceReport") && server.tool("createComplianceReport", "Create compliance reports for auditing", {
|
|
1180
|
-
standardId: zod_1.z.string().describe("ID of the compliance standard"),
|
|
1181
|
-
format: zod_1.z.enum(['pdf', 'html', 'json']).optional().describe("Format of the report")
|
|
1182
|
-
}, async (params, extra) => {
|
|
1183
|
-
const result = await devSecOpsTools.createComplianceReport(params);
|
|
1184
|
-
return {
|
|
1185
|
-
content: result.content,
|
|
1186
|
-
rawData: result.rawData,
|
|
1187
|
-
isError: result.isError
|
|
1188
|
-
};
|
|
1189
|
-
});
|
|
1190
|
-
allowedTools.has("manageSecurityPolicies") && server.tool("manageSecurityPolicies", "Manage security policies", {
|
|
1191
|
-
policyName: zod_1.z.string().describe("Name of the security policy"),
|
|
1192
|
-
action: zod_1.z.enum(['create', 'update', 'delete', 'get']).describe("Action to perform on the policy"),
|
|
1193
|
-
policyDefinition: zod_1.z.record(zod_1.z.any()).optional().describe("Definition of the policy")
|
|
1194
|
-
}, async (params, extra) => {
|
|
1195
|
-
const result = await devSecOpsTools.manageSecurityPolicies(params);
|
|
1196
|
-
return {
|
|
1197
|
-
content: result.content,
|
|
1198
|
-
rawData: result.rawData,
|
|
1199
|
-
isError: result.isError
|
|
1200
|
-
};
|
|
1201
|
-
});
|
|
1202
|
-
allowedTools.has("trackSecurityAwareness") && server.tool("trackSecurityAwareness", "Track security awareness and training", {
|
|
1203
|
-
teamId: zod_1.z.string().optional().describe("ID of the team to track"),
|
|
1204
|
-
trainingId: zod_1.z.string().optional().describe("ID of specific training to track"),
|
|
1205
|
-
timeRange: zod_1.z.string().optional().describe("Time range for tracking (e.g., '90d')")
|
|
1206
|
-
}, async (params, extra) => {
|
|
1207
|
-
const result = await devSecOpsTools.trackSecurityAwareness(params);
|
|
1208
|
-
return {
|
|
1209
|
-
content: result.content,
|
|
1210
|
-
rawData: result.rawData,
|
|
1211
|
-
isError: result.isError
|
|
1212
|
-
};
|
|
1213
|
-
});
|
|
1214
|
-
allowedTools.has("rotateSecrets") && server.tool("rotateSecrets", "Rotate secrets and credentials", {
|
|
1215
|
-
secretName: zod_1.z.string().optional().describe("Name of the secret to rotate"),
|
|
1216
|
-
secretType: zod_1.z.enum(['password', 'token', 'certificate', 'key']).optional().describe("Type of secret to rotate"),
|
|
1217
|
-
force: zod_1.z.boolean().optional().describe("Force rotation even if not expired")
|
|
1218
|
-
}, async (params, extra) => {
|
|
1219
|
-
const result = await devSecOpsTools.rotateSecrets(params);
|
|
1220
|
-
return {
|
|
1221
|
-
content: result.content,
|
|
1222
|
-
rawData: result.rawData,
|
|
1223
|
-
isError: result.isError
|
|
1224
|
-
};
|
|
1225
|
-
});
|
|
1226
|
-
allowedTools.has("auditSecretUsage") && server.tool("auditSecretUsage", "Audit usage of secrets across services", {
|
|
1227
|
-
secretName: zod_1.z.string().optional().describe("Name of the secret to audit"),
|
|
1228
|
-
timeRange: zod_1.z.string().optional().describe("Time range for the audit (e.g., '30d')")
|
|
1229
|
-
}, async (params, extra) => {
|
|
1230
|
-
const result = await devSecOpsTools.auditSecretUsage(params);
|
|
1231
|
-
return {
|
|
1232
|
-
content: result.content,
|
|
1233
|
-
rawData: result.rawData,
|
|
1234
|
-
isError: result.isError
|
|
1235
|
-
};
|
|
1236
|
-
});
|
|
1237
|
-
allowedTools.has("vaultIntegration") && server.tool("vaultIntegration", "Integrate with secret vaults", {
|
|
1238
|
-
vaultUrl: zod_1.z.string().describe("URL of the vault to integrate with"),
|
|
1239
|
-
secretPath: zod_1.z.string().optional().describe("Path to the secret in the vault"),
|
|
1240
|
-
action: zod_1.z.enum(['get', 'list', 'set', 'delete']).describe("Action to perform"),
|
|
1241
|
-
secretValue: zod_1.z.string().optional().describe("Value to set (for 'set' action)")
|
|
1242
|
-
}, async (params, extra) => {
|
|
1243
|
-
const result = await devSecOpsTools.vaultIntegration(params);
|
|
1244
|
-
return {
|
|
1245
|
-
content: result.content,
|
|
1246
|
-
rawData: result.rawData,
|
|
1247
|
-
isError: result.isError
|
|
1248
|
-
};
|
|
1249
|
-
});
|
|
1250
|
-
// Register ArtifactManagement Tools
|
|
1251
|
-
allowedTools.has("listArtifactFeeds") && server.tool("listArtifactFeeds", "List artifact feeds in the organization", {
|
|
1252
|
-
feedType: zod_1.z.enum(['npm', 'nuget', 'maven', 'python', 'universal', 'all']).optional().describe("Type of feeds to list"),
|
|
1253
|
-
includeDeleted: zod_1.z.boolean().optional().describe("Include deleted feeds")
|
|
1254
|
-
}, async (params, extra) => {
|
|
1255
|
-
const result = await artifactManagementTools.listArtifactFeeds(params);
|
|
1256
|
-
return {
|
|
1257
|
-
content: result.content,
|
|
1258
|
-
rawData: result.rawData,
|
|
1259
|
-
isError: result.isError
|
|
1260
|
-
};
|
|
1261
|
-
});
|
|
1262
|
-
allowedTools.has("getPackageVersions") && server.tool("getPackageVersions", "Get versions of a package in a feed", {
|
|
1263
|
-
feedId: zod_1.z.string().describe("ID of the feed"),
|
|
1264
|
-
packageName: zod_1.z.string().describe("Name of the package"),
|
|
1265
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of versions to return")
|
|
1266
|
-
}, async (params, extra) => {
|
|
1267
|
-
const result = await artifactManagementTools.getPackageVersions(params);
|
|
1268
|
-
return {
|
|
1269
|
-
content: result.content,
|
|
1270
|
-
rawData: result.rawData,
|
|
1271
|
-
isError: result.isError
|
|
1272
|
-
};
|
|
1273
|
-
});
|
|
1274
|
-
allowedTools.has("publishPackage") && server.tool("publishPackage", "Publish a package to a feed", {
|
|
1275
|
-
feedId: zod_1.z.string().describe("ID of the feed to publish to"),
|
|
1276
|
-
packageType: zod_1.z.enum(['npm', 'nuget', 'maven', 'python', 'universal']).describe("Type of package"),
|
|
1277
|
-
packagePath: zod_1.z.string().describe("Path to the package file"),
|
|
1278
|
-
packageVersion: zod_1.z.string().optional().describe("Version of the package")
|
|
1279
|
-
}, async (params, extra) => {
|
|
1280
|
-
const result = await artifactManagementTools.publishPackage(params);
|
|
1281
|
-
return {
|
|
1282
|
-
content: result.content,
|
|
1283
|
-
rawData: result.rawData,
|
|
1284
|
-
isError: result.isError
|
|
1285
|
-
};
|
|
1286
|
-
});
|
|
1287
|
-
allowedTools.has("promotePackage") && server.tool("promotePackage", "Promote a package version between views", {
|
|
1288
|
-
feedId: zod_1.z.string().describe("ID of the feed"),
|
|
1289
|
-
packageName: zod_1.z.string().describe("Name of the package"),
|
|
1290
|
-
packageVersion: zod_1.z.string().describe("Version of the package"),
|
|
1291
|
-
sourceView: zod_1.z.string().describe("Source view (e.g., 'prerelease')"),
|
|
1292
|
-
targetView: zod_1.z.string().describe("Target view (e.g., 'release')")
|
|
1293
|
-
}, async (params, extra) => {
|
|
1294
|
-
const result = await artifactManagementTools.promotePackage(params);
|
|
1295
|
-
return {
|
|
1296
|
-
content: result.content,
|
|
1297
|
-
rawData: result.rawData,
|
|
1298
|
-
isError: result.isError
|
|
1299
|
-
};
|
|
1300
|
-
});
|
|
1301
|
-
allowedTools.has("deletePackageVersion") && server.tool("deletePackageVersion", "Delete a version of a package", {
|
|
1302
|
-
feedId: zod_1.z.string().describe("ID of the feed"),
|
|
1303
|
-
packageName: zod_1.z.string().describe("Name of the package"),
|
|
1304
|
-
packageVersion: zod_1.z.string().describe("Version of the package to delete"),
|
|
1305
|
-
permanent: zod_1.z.boolean().optional().describe("Permanently delete the package version")
|
|
1306
|
-
}, async (params, extra) => {
|
|
1307
|
-
const result = await artifactManagementTools.deletePackageVersion(params);
|
|
1308
|
-
return {
|
|
1309
|
-
content: result.content,
|
|
1310
|
-
rawData: result.rawData,
|
|
1311
|
-
isError: result.isError
|
|
1312
|
-
};
|
|
1313
|
-
});
|
|
1314
|
-
allowedTools.has("listContainerImages") && server.tool("listContainerImages", "List container images in a repository", {
|
|
1315
|
-
repositoryName: zod_1.z.string().optional().describe("Name of the container repository"),
|
|
1316
|
-
includeManifests: zod_1.z.boolean().optional().describe("Include image manifests"),
|
|
1317
|
-
includeDeleted: zod_1.z.boolean().optional().describe("Include deleted images")
|
|
1318
|
-
}, async (params, extra) => {
|
|
1319
|
-
const result = await artifactManagementTools.listContainerImages(params);
|
|
1320
|
-
return {
|
|
1321
|
-
content: result.content,
|
|
1322
|
-
rawData: result.rawData,
|
|
1323
|
-
isError: result.isError
|
|
1324
|
-
};
|
|
1325
|
-
});
|
|
1326
|
-
allowedTools.has("getContainerImageTags") && server.tool("getContainerImageTags", "Get tags for a container image", {
|
|
1327
|
-
repositoryName: zod_1.z.string().describe("Name of the container repository"),
|
|
1328
|
-
imageName: zod_1.z.string().describe("Name of the container image"),
|
|
1329
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of tags to return")
|
|
1330
|
-
}, async (params, extra) => {
|
|
1331
|
-
const result = await artifactManagementTools.getContainerImageTags(params);
|
|
1332
|
-
return {
|
|
1333
|
-
content: result.content,
|
|
1334
|
-
rawData: result.rawData,
|
|
1335
|
-
isError: result.isError
|
|
1336
|
-
};
|
|
1337
|
-
});
|
|
1338
|
-
allowedTools.has("scanContainerImage") && server.tool("scanContainerImage", "Scan a container image for vulnerabilities and compliance issues", {
|
|
1339
|
-
repositoryName: zod_1.z.string().describe("Name of the container repository"),
|
|
1340
|
-
imageTag: zod_1.z.string().describe("Tag of the container image to scan"),
|
|
1341
|
-
scanType: zod_1.z.enum(['vulnerability', 'compliance', 'both']).optional().describe("Type of scan to perform")
|
|
1342
|
-
}, async (params, extra) => {
|
|
1343
|
-
const result = await artifactManagementTools.scanContainerImage(params);
|
|
1344
|
-
return {
|
|
1345
|
-
content: result.content,
|
|
1346
|
-
rawData: result.rawData,
|
|
1347
|
-
isError: result.isError
|
|
1348
|
-
};
|
|
1349
|
-
});
|
|
1350
|
-
allowedTools.has("manageContainerPolicies") && server.tool("manageContainerPolicies", "Manage policies for container repositories", {
|
|
1351
|
-
repositoryName: zod_1.z.string().describe("Name of the container repository"),
|
|
1352
|
-
policyType: zod_1.z.enum(['retention', 'security', 'access']).describe("Type of policy to manage"),
|
|
1353
|
-
action: zod_1.z.enum(['get', 'set', 'delete']).describe("Action to perform on the policy"),
|
|
1354
|
-
policySettings: zod_1.z.record(zod_1.z.any()).optional().describe("Settings for the policy when setting")
|
|
1355
|
-
}, async (params, extra) => {
|
|
1356
|
-
const result = await artifactManagementTools.manageContainerPolicies(params);
|
|
1357
|
-
return {
|
|
1358
|
-
content: result.content,
|
|
1359
|
-
rawData: result.rawData,
|
|
1360
|
-
isError: result.isError
|
|
1361
|
-
};
|
|
1362
|
-
});
|
|
1363
|
-
allowedTools.has("manageUniversalPackages") && server.tool("manageUniversalPackages", "Manage universal packages", {
|
|
1364
|
-
packageName: zod_1.z.string().describe("Name of the universal package"),
|
|
1365
|
-
action: zod_1.z.enum(['download', 'upload', 'delete']).describe("Action to perform"),
|
|
1366
|
-
packagePath: zod_1.z.string().optional().describe("Path for package upload or download"),
|
|
1367
|
-
packageVersion: zod_1.z.string().optional().describe("Version of the package")
|
|
1368
|
-
}, async (params, extra) => {
|
|
1369
|
-
const result = await artifactManagementTools.manageUniversalPackages(params);
|
|
1370
|
-
return {
|
|
1371
|
-
content: result.content,
|
|
1372
|
-
rawData: result.rawData,
|
|
1373
|
-
isError: result.isError
|
|
1374
|
-
};
|
|
1375
|
-
});
|
|
1376
|
-
allowedTools.has("createPackageDownloadReport") && server.tool("createPackageDownloadReport", "Create reports on package downloads", {
|
|
1377
|
-
feedId: zod_1.z.string().optional().describe("ID of the feed"),
|
|
1378
|
-
packageName: zod_1.z.string().optional().describe("Name of the package"),
|
|
1379
|
-
timeRange: zod_1.z.string().optional().describe("Time range for the report (e.g., '30d')"),
|
|
1380
|
-
format: zod_1.z.enum(['csv', 'json']).optional().describe("Format of the report")
|
|
1381
|
-
}, async (params, extra) => {
|
|
1382
|
-
const result = await artifactManagementTools.createPackageDownloadReport(params);
|
|
1383
|
-
return {
|
|
1384
|
-
content: result.content,
|
|
1385
|
-
rawData: result.rawData,
|
|
1386
|
-
isError: result.isError
|
|
1387
|
-
};
|
|
1388
|
-
});
|
|
1389
|
-
allowedTools.has("checkPackageDependencies") && server.tool("checkPackageDependencies", "Check package dependencies and vulnerabilities", {
|
|
1390
|
-
packageName: zod_1.z.string().describe("Name of the package to check"),
|
|
1391
|
-
packageVersion: zod_1.z.string().optional().describe("Version of the package"),
|
|
1392
|
-
includeTransitive: zod_1.z.boolean().optional().describe("Include transitive dependencies"),
|
|
1393
|
-
checkVulnerabilities: zod_1.z.boolean().optional().describe("Check for known vulnerabilities")
|
|
1394
|
-
}, async (params, extra) => {
|
|
1395
|
-
const result = await artifactManagementTools.checkPackageDependencies(params);
|
|
1396
|
-
return {
|
|
1397
|
-
content: result.content,
|
|
1398
|
-
rawData: result.rawData,
|
|
1399
|
-
isError: result.isError
|
|
1400
|
-
};
|
|
1401
|
-
});
|
|
1402
|
-
// AI Assisted Development Tools
|
|
1403
|
-
allowedTools.has("getAICodeReview") && server.tool("getAICodeReview", "Get AI-based code review suggestions", {
|
|
1404
|
-
pullRequestId: zIdOptional().describe("ID of the pull request to review"),
|
|
1405
|
-
repositoryId: zod_1.z.string().optional().describe("ID of the repository"),
|
|
1406
|
-
commitId: zod_1.z.string().optional().describe("ID of the commit to review"),
|
|
1407
|
-
filePath: zod_1.z.string().optional().describe("Path to the file to review")
|
|
1408
|
-
}, async (params, extra) => {
|
|
1409
|
-
const result = await aiAssistedDevelopmentTools.getAICodeReview(params);
|
|
1410
|
-
return {
|
|
1411
|
-
content: result.content,
|
|
1412
|
-
rawData: result.rawData,
|
|
1413
|
-
structuredContent: result.structuredContent
|
|
1414
|
-
};
|
|
1415
|
-
});
|
|
1416
|
-
allowedTools.has("suggestCodeOptimization") && server.tool("suggestCodeOptimization", "Suggest code optimizations using AI. Supports both repository names and IDs.", {
|
|
1417
|
-
repository: zod_1.z.string().describe("Repository name (e.g., 'MyProject') or ID (GUID). Repository names are case-insensitive."),
|
|
1418
|
-
filePath: zod_1.z.string().describe("Path to the file to optimize"),
|
|
1419
|
-
lineStart: zod_1.z.coerce.number().optional().describe("Starting line number"),
|
|
1420
|
-
lineEnd: zod_1.z.coerce.number().optional().describe("Ending line number"),
|
|
1421
|
-
optimizationType: zod_1.z.enum(['performance', 'memory', 'readability', 'all']).optional().describe("Type of optimization to focus on")
|
|
1422
|
-
}, async (params, extra) => {
|
|
1423
|
-
const result = await aiAssistedDevelopmentTools.suggestCodeOptimization(params);
|
|
1424
|
-
return {
|
|
1425
|
-
content: result.content,
|
|
1426
|
-
rawData: result.rawData,
|
|
1427
|
-
structuredContent: result.structuredContent
|
|
1428
|
-
};
|
|
1429
|
-
});
|
|
1430
|
-
allowedTools.has("identifyCodeSmells") && server.tool("identifyCodeSmells", "Identify potential code smells and anti-patterns. Supports both repository names and IDs.", {
|
|
1431
|
-
repository: zod_1.z.string().describe("Repository name (e.g., 'MyProject') or ID (GUID). Repository names are case-insensitive."),
|
|
1432
|
-
branch: zod_1.z.string().optional().describe("Branch to analyze"),
|
|
1433
|
-
filePath: zod_1.z.string().optional().describe("Path to the file to analyze"),
|
|
1434
|
-
severity: zod_1.z.enum(['high', 'medium', 'low', 'all']).optional().describe("Severity level to filter by")
|
|
1435
|
-
}, async (params, extra) => {
|
|
1436
|
-
const result = await aiAssistedDevelopmentTools.identifyCodeSmells(params);
|
|
1437
|
-
return {
|
|
1438
|
-
content: result.content,
|
|
1439
|
-
rawData: result.rawData,
|
|
1440
|
-
structuredContent: result.structuredContent
|
|
1441
|
-
};
|
|
1442
|
-
});
|
|
1443
|
-
allowedTools.has("getPredictiveBugAnalysis") && server.tool("getPredictiveBugAnalysis", "Predict potential bugs in code changes. Supports both repository names and IDs.", {
|
|
1444
|
-
repository: zod_1.z.string().describe("Repository name (e.g., 'MyProject') or ID (GUID). Repository names are case-insensitive."),
|
|
1445
|
-
pullRequestId: zIdOptional().describe("ID of the pull request"),
|
|
1446
|
-
branch: zod_1.z.string().optional().describe("Branch to analyze"),
|
|
1447
|
-
filePath: zod_1.z.string().optional().describe("Path to the file to analyze")
|
|
1448
|
-
}, async (params, extra) => {
|
|
1449
|
-
const result = await aiAssistedDevelopmentTools.getPredictiveBugAnalysis(params);
|
|
1450
|
-
return {
|
|
1451
|
-
content: result.content,
|
|
1452
|
-
rawData: result.rawData,
|
|
1453
|
-
structuredContent: result.structuredContent
|
|
1454
|
-
};
|
|
1455
|
-
});
|
|
1456
|
-
allowedTools.has("getDeveloperProductivity") && server.tool("getDeveloperProductivity", "Measure developer productivity metrics", {
|
|
1457
|
-
userId: zod_1.z.string().optional().describe("ID of the user"),
|
|
1458
|
-
teamId: zod_1.z.string().optional().describe("ID of the team"),
|
|
1459
|
-
timeRange: zod_1.z.string().optional().describe("Time range for analysis (e.g., '30d', '3m')"),
|
|
1460
|
-
includeMetrics: zod_1.z.array(zod_1.z.string()).optional().describe("Specific metrics to include")
|
|
1461
|
-
}, async (params, extra) => {
|
|
1462
|
-
const result = await aiAssistedDevelopmentTools.getDeveloperProductivity(params);
|
|
1463
|
-
return {
|
|
1464
|
-
content: result.content,
|
|
1465
|
-
rawData: result.rawData,
|
|
1466
|
-
structuredContent: result.structuredContent
|
|
1467
|
-
};
|
|
1468
|
-
});
|
|
1469
|
-
allowedTools.has("getPredictiveEffortEstimation") && server.tool("getPredictiveEffortEstimation", "AI-based effort estimation for work items", {
|
|
1470
|
-
workItemIds: zIdArray().optional().describe("IDs of work items to estimate"),
|
|
1471
|
-
workItemType: zod_1.z.string().optional().describe("Type of work items to estimate"),
|
|
1472
|
-
areaPath: zod_1.z.string().optional().describe("Area path to filter work items")
|
|
1473
|
-
}, async (params, extra) => {
|
|
1474
|
-
const result = await aiAssistedDevelopmentTools.getPredictiveEffortEstimation(params);
|
|
1475
|
-
return {
|
|
1476
|
-
content: result.content,
|
|
1477
|
-
rawData: result.rawData,
|
|
1478
|
-
structuredContent: result.structuredContent
|
|
1479
|
-
};
|
|
1480
|
-
});
|
|
1481
|
-
allowedTools.has("getCodeQualityTrends") && server.tool("getCodeQualityTrends", "Track code quality trends over time", {
|
|
1482
|
-
repositoryId: zod_1.z.string().optional().describe("ID of the repository"),
|
|
1483
|
-
branch: zod_1.z.string().optional().describe("Branch to analyze"),
|
|
1484
|
-
timeRange: zod_1.z.string().optional().describe("Time range for analysis (e.g., '90d', '6m')"),
|
|
1485
|
-
metrics: zod_1.z.array(zod_1.z.string()).optional().describe("Specific metrics to include")
|
|
1486
|
-
}, async (params, extra) => {
|
|
1487
|
-
const result = await aiAssistedDevelopmentTools.getCodeQualityTrends(params);
|
|
1488
|
-
return {
|
|
1489
|
-
content: result.content,
|
|
1490
|
-
rawData: result.rawData,
|
|
1491
|
-
structuredContent: result.structuredContent
|
|
1492
|
-
};
|
|
1493
|
-
});
|
|
1494
|
-
allowedTools.has("suggestWorkItemRefinements") && server.tool("suggestWorkItemRefinements", "Get AI suggestions for work item refinements", {
|
|
1495
|
-
workItemId: zIdOptional().describe("ID of the work item to refine"),
|
|
1496
|
-
workItemType: zod_1.z.string().optional().describe("Type of work item"),
|
|
1497
|
-
areaPath: zod_1.z.string().optional().describe("Area path to filter work items")
|
|
1498
|
-
}, async (params, extra) => {
|
|
1499
|
-
const result = await aiAssistedDevelopmentTools.suggestWorkItemRefinements(params);
|
|
1500
|
-
return {
|
|
1501
|
-
content: result.content,
|
|
1502
|
-
rawData: result.rawData,
|
|
1503
|
-
structuredContent: result.structuredContent
|
|
1504
|
-
};
|
|
1505
|
-
});
|
|
1506
|
-
allowedTools.has("suggestAutomationOpportunities") && server.tool("suggestAutomationOpportunities", "Identify opportunities for automation", {
|
|
1507
|
-
projectId: zod_1.z.string().optional().describe("ID of the project"),
|
|
1508
|
-
scopeType: zod_1.z.enum(['builds', 'releases', 'tests', 'workitems', 'all']).optional().describe("Type of scope to analyze")
|
|
1509
|
-
}, async (params, extra) => {
|
|
1510
|
-
const result = await aiAssistedDevelopmentTools.suggestAutomationOpportunities(params);
|
|
1511
|
-
return {
|
|
1512
|
-
content: result.content,
|
|
1513
|
-
rawData: result.rawData,
|
|
1514
|
-
structuredContent: result.structuredContent
|
|
1515
|
-
};
|
|
1516
|
-
});
|
|
1517
|
-
allowedTools.has("createIntelligentAlerts") && server.tool("createIntelligentAlerts", "Set up intelligent alerts based on patterns", {
|
|
1518
|
-
alertName: zod_1.z.string().describe("Name of the alert"),
|
|
1519
|
-
alertType: zod_1.z.enum(['build', 'release', 'test', 'workitem', 'code']).describe("Type of alert to create"),
|
|
1520
|
-
conditions: zod_1.z.record(zod_1.z.any()).describe("Conditions for the alert"),
|
|
1521
|
-
actions: zod_1.z.record(zod_1.z.any()).optional().describe("Actions to take when the alert triggers")
|
|
1522
|
-
}, async (params, extra) => {
|
|
1523
|
-
const result = await aiAssistedDevelopmentTools.createIntelligentAlerts(params);
|
|
1524
|
-
return {
|
|
1525
|
-
content: result.content,
|
|
1526
|
-
rawData: result.rawData,
|
|
1527
|
-
structuredContent: result.structuredContent
|
|
1528
|
-
};
|
|
1529
|
-
});
|
|
1530
|
-
allowedTools.has("predictBuildFailures") && server.tool("predictBuildFailures", "Predict potential build failures before they occur", {
|
|
1531
|
-
buildDefinitionId: zId().describe("ID of the build definition"),
|
|
1532
|
-
lookbackPeriod: zod_1.z.string().optional().describe("Period to analyze for patterns (e.g., '30d')")
|
|
1533
|
-
}, async (params, extra) => {
|
|
1534
|
-
const result = await aiAssistedDevelopmentTools.predictBuildFailures(params);
|
|
1535
|
-
return {
|
|
1536
|
-
content: result.content,
|
|
1537
|
-
rawData: result.rawData,
|
|
1538
|
-
structuredContent: result.structuredContent
|
|
1539
|
-
};
|
|
1540
|
-
});
|
|
1541
|
-
allowedTools.has("optimizeTestSelection") && server.tool("optimizeTestSelection", "Intelligently select tests to run based on changes", {
|
|
1542
|
-
buildId: zId().describe("ID of the build"),
|
|
1543
|
-
changedFiles: zod_1.z.array(zod_1.z.string()).optional().describe("List of changed files"),
|
|
1544
|
-
maxTestCount: zod_1.z.coerce.number().optional().describe("Maximum number of tests to select")
|
|
1545
|
-
}, async (params, extra) => {
|
|
1546
|
-
const result = await aiAssistedDevelopmentTools.optimizeTestSelection(params);
|
|
1547
|
-
return {
|
|
1548
|
-
content: result.content,
|
|
1549
|
-
rawData: result.rawData,
|
|
1550
|
-
structuredContent: result.structuredContent
|
|
1551
|
-
};
|
|
1552
|
-
});
|
|
1553
|
-
// Register Wiki Tools
|
|
1554
|
-
allowedTools.has("listWikis") && server.tool("listWikis", "List all wikis in the project", {
|
|
1555
|
-
project: zod_1.z.string().optional().describe("Project name or ID (defaults to configured project)"),
|
|
1556
|
-
}, async (params) => {
|
|
1557
|
-
const result = await wikiTools.listWikis(params);
|
|
1558
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1559
|
-
});
|
|
1560
|
-
allowedTools.has("getWiki") && server.tool("getWiki", "Get details about a specific wiki", {
|
|
1561
|
-
wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
|
|
1562
|
-
project: zod_1.z.string().optional().describe("Project name or ID"),
|
|
1563
|
-
}, async (params) => {
|
|
1564
|
-
const result = await wikiTools.getWiki(params);
|
|
1565
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1566
|
-
});
|
|
1567
|
-
allowedTools.has("listWikiPages") && server.tool("listWikiPages", "List wiki pages under a path", {
|
|
1568
|
-
wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
|
|
1569
|
-
path: zod_1.z.string().optional().describe("Path to list pages under (default: root '/')"),
|
|
1570
|
-
recursionLevel: zod_1.z.string().optional().describe("'oneLevel' (default) or 'full' for all descendants"),
|
|
1571
|
-
project: zod_1.z.string().optional().describe("Project name or ID"),
|
|
1572
|
-
}, async (params) => {
|
|
1573
|
-
const result = await wikiTools.listWikiPages(params);
|
|
1574
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1575
|
-
});
|
|
1576
|
-
allowedTools.has("getWikiPageContent") && server.tool("getWikiPageContent", "Get the content of a wiki page", {
|
|
1577
|
-
wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
|
|
1578
|
-
path: zod_1.z.string().optional().describe("Page path (default: root '/')"),
|
|
1579
|
-
project: zod_1.z.string().optional().describe("Project name or ID"),
|
|
1580
|
-
}, async (params) => {
|
|
1581
|
-
const result = await wikiTools.getWikiPageContent(params);
|
|
1582
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1583
|
-
});
|
|
1584
|
-
allowedTools.has("createOrUpdateWikiPage") && server.tool("createOrUpdateWikiPage", "Create or update a wiki page with the given content", {
|
|
1585
|
-
wikiIdentifier: zod_1.z.string().describe("Wiki name or ID"),
|
|
1586
|
-
path: zod_1.z.string().describe("Page path (e.g., '/My Page' or '/Section/Sub Page')"),
|
|
1587
|
-
content: zod_1.z.string().describe("Page content in markdown format"),
|
|
1588
|
-
comment: zod_1.z.string().optional().describe("Optional commit comment for the change"),
|
|
1589
|
-
project: zod_1.z.string().optional().describe("Project name or ID"),
|
|
1590
|
-
}, async (params) => {
|
|
1591
|
-
const result = await wikiTools.createOrUpdateWikiPage(params);
|
|
1592
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1593
|
-
});
|
|
1594
|
-
// Register Build/Pipeline Tools
|
|
1595
|
-
allowedTools.has("getBuilds") && server.tool("getBuilds", "List builds with optional filters (status, result, branch, definition, tags)", {
|
|
1596
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1597
|
-
definitions: zIdArray().optional().describe("Filter by definition IDs"),
|
|
1598
|
-
statusFilter: zod_1.z.string().optional().describe("Filter by status: inProgress, completed, cancelling, postponed, notStarted, all"),
|
|
1599
|
-
resultFilter: zod_1.z.string().optional().describe("Filter by result: succeeded, partiallySucceeded, failed, canceled"),
|
|
1600
|
-
branchName: zod_1.z.string().optional().describe("Filter by source branch (e.g., 'refs/heads/main')"),
|
|
1601
|
-
repositoryId: zod_1.z.string().optional().describe("Filter by repository ID"),
|
|
1602
|
-
repositoryType: zod_1.z.string().optional().describe("Repository type (e.g., 'TfsGit')"),
|
|
1603
|
-
requestedFor: zod_1.z.string().optional().describe("Filter by who requested the build"),
|
|
1604
|
-
tagFilters: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Filter by tags"),
|
|
1605
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of builds to return (default 25)"),
|
|
1606
|
-
queryOrder: zod_1.z.string().optional().describe("Order: startTimeDescending (default) or startTimeAscending"),
|
|
1607
|
-
}, async (params) => {
|
|
1608
|
-
const result = await buildTools.getBuilds(params);
|
|
1609
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1610
|
-
});
|
|
1611
|
-
allowedTools.has("getBuild") && server.tool("getBuild", "Get detailed information about a specific build by ID", {
|
|
1612
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1613
|
-
buildId: zId().describe("Build ID"),
|
|
1614
|
-
}, async (params) => {
|
|
1615
|
-
const result = await buildTools.getBuild(params);
|
|
1616
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1617
|
-
});
|
|
1618
|
-
allowedTools.has("getBuildLog") && server.tool("getBuildLog", "Get build logs. Without logId returns log metadata list; with logId returns specific log content", {
|
|
1619
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1620
|
-
buildId: zId().describe("Build ID"),
|
|
1621
|
-
logId: zIdOptional().describe("Specific log ID to retrieve content for"),
|
|
1622
|
-
startLine: zod_1.z.coerce.number().optional().describe("Start line for log content"),
|
|
1623
|
-
endLine: zod_1.z.coerce.number().optional().describe("End line for log content"),
|
|
1624
|
-
}, async (params) => {
|
|
1625
|
-
const result = await buildTools.getBuildLog(params);
|
|
1626
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1627
|
-
});
|
|
1628
|
-
allowedTools.has("getBuildChanges") && server.tool("getBuildChanges", "Get changes (commits) associated with a build", {
|
|
1629
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1630
|
-
buildId: zId().describe("Build ID"),
|
|
1631
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of changes to return (default 50)"),
|
|
1632
|
-
}, async (params) => {
|
|
1633
|
-
const result = await buildTools.getBuildChanges(params);
|
|
1634
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1635
|
-
});
|
|
1636
|
-
allowedTools.has("getDefinitions") && server.tool("getDefinitions", "List pipeline/build definitions with optional filters", {
|
|
1637
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1638
|
-
name: zod_1.z.string().optional().describe("Filter by definition name (wildcard supported)"),
|
|
1639
|
-
repositoryId: zod_1.z.string().optional().describe("Filter by repository ID"),
|
|
1640
|
-
repositoryType: zod_1.z.string().optional().describe("Repository type (e.g., 'TfsGit')"),
|
|
1641
|
-
path: zod_1.z.string().optional().describe("Filter by folder path (e.g., '\\\\folder')"),
|
|
1642
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of definitions to return (default 25)"),
|
|
1643
|
-
includeLatestBuilds: zod_1.z.boolean().optional().describe("Include latest build info for each definition"),
|
|
1644
|
-
}, async (params) => {
|
|
1645
|
-
const result = await buildTools.getDefinitions(params);
|
|
1646
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1647
|
-
});
|
|
1648
|
-
allowedTools.has("getDefinition") && server.tool("getDefinition", "Get detailed information about a specific pipeline/build definition", {
|
|
1649
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1650
|
-
definitionId: zId().describe("Definition ID"),
|
|
1651
|
-
includeLatestBuilds: zod_1.z.boolean().optional().describe("Include latest build info"),
|
|
1652
|
-
}, async (params) => {
|
|
1653
|
-
const result = await buildTools.getDefinition(params);
|
|
1654
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1655
|
-
});
|
|
1656
|
-
allowedTools.has("runPipeline") && server.tool("runPipeline", "Queue/trigger a pipeline run", {
|
|
1657
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1658
|
-
definitionId: zId().describe("Pipeline definition ID to run"),
|
|
1659
|
-
sourceBranch: zod_1.z.string().optional().describe("Source branch (e.g., 'refs/heads/main')"),
|
|
1660
|
-
parameters: zod_1.z.record(zod_1.z.string()).optional().describe("Pipeline parameters as key-value pairs"),
|
|
1661
|
-
}, async (params) => {
|
|
1662
|
-
const result = await buildTools.runPipeline(params);
|
|
1663
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1664
|
-
});
|
|
1665
|
-
allowedTools.has("getBuildArtifacts") && server.tool("getBuildArtifacts", "List artifacts produced by a build", {
|
|
1666
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1667
|
-
buildId: zId().describe("Build ID"),
|
|
1668
|
-
}, async (params) => {
|
|
1669
|
-
const result = await buildTools.getBuildArtifacts(params);
|
|
1670
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1671
|
-
});
|
|
1672
|
-
allowedTools.has("getBuildTimeline") && server.tool("getBuildTimeline", "Get build timeline showing stages, jobs, and tasks with their status", {
|
|
1673
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1674
|
-
buildId: zId().describe("Build ID"),
|
|
1675
|
-
}, async (params) => {
|
|
1676
|
-
const result = await buildTools.getBuildTimeline(params);
|
|
1677
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1678
|
-
});
|
|
1679
|
-
allowedTools.has("getBuildWorkItems") && server.tool("getBuildWorkItems", "Get work items associated with a build with a batched summary field set.", {
|
|
1680
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1681
|
-
buildId: zId().describe("Build ID"),
|
|
1682
|
-
top: zod_1.z.coerce.number().optional().describe("Maximum number of work items to return (default 50)"),
|
|
1683
|
-
fields: zod_1.z.preprocess(coerceArray, zod_1.z.array(zod_1.z.string()).optional()).describe("Optional field list to batch-fetch for the returned work items. Defaults to a basic summary field set."),
|
|
1684
|
-
}, async (params) => {
|
|
1685
|
-
const result = await buildTools.getBuildWorkItems(params);
|
|
1686
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1687
|
-
});
|
|
1688
|
-
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.", {
|
|
1689
|
-
project: zod_1.z.string().optional().describe("Azure DevOps project name or ID. Defaults to the configured project."),
|
|
1690
|
-
repository: zod_1.z.string().describe("Repository name or ID containing the pull request"),
|
|
1691
|
-
pullRequestId: zId().describe("The pull request ID"),
|
|
1692
|
-
includeTimeline: zod_1.z.boolean().optional().describe("Include build timeline (stages, jobs, tasks) for each build. Useful for seeing which stages/tasks failed."),
|
|
1693
|
-
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."),
|
|
1694
|
-
}, async (params) => {
|
|
1695
|
-
const result = await buildTools.getPullRequestBuilds(params);
|
|
1696
|
-
return { content: result.content, rawData: result.rawData, isError: result.isError, structuredContent: result.structuredContent };
|
|
1697
|
-
});
|
|
1698
|
-
// Create a transport (use stdio for simplicity)
|
|
1699
|
-
const transport = new stdio_js_1.StdioServerTransport();
|
|
1700
|
-
// Connect to the transport and start listening
|
|
1701
|
-
await server.connect(transport);
|
|
1702
|
-
}
|
|
1703
|
-
catch (error) {
|
|
1704
|
-
console.error('Error starting MCP server:', error);
|
|
1705
|
-
if (error instanceof Error) {
|
|
1706
|
-
console.error('Stack trace:', error.stack);
|
|
1707
|
-
}
|
|
1708
|
-
process.exit(1);
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
// Set an environment variable to indicate we're in MCP mode
|
|
1712
|
-
// This helps prevent console.log from interfering with stdio communication
|
|
1713
|
-
process.env.MCP_MODE = 'true';
|
|
1714
|
-
// Run the server
|
|
1715
|
-
main();
|
|
1716
|
-
//# sourceMappingURL=index.js.map
|