@mcp-apps/azure-devops-mcp-server
Version:
A Model Context Protocol (MCP) server for Azure DevOps integration
42 lines (40 loc) • 1.87 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPRBasicInfoTool = void 0;
const zod_1 = require("zod");
const azure_devops_service_js_1 = require("../services/azure-devops-service.js");
exports.getPRBasicInfoTool = {
name: "get-pr-basic-info",
description: `
Retrieves basic information about a specific pull request.
This tool fetches essential PR metadata including title, description, author,
reviewers, status, and basic statistics for risk analysis.
Parameters:
- organizationUrl: Azure DevOps organization URL (e.g., https://dev.azure.com/organization)
- project: Project name containing the repository
- repositoryName: Name of the repository
- pullRequestId: ID of the pull request to analyze
`,
parameters: {
organizationUrl: zod_1.z.string().describe("Azure DevOps organization URL"),
project: zod_1.z.string().describe("Project name"),
repositoryName: zod_1.z.string().describe("Repository name"),
pullRequestId: zod_1.z.number().int().describe("Pull request ID")
},
handler: async ({ organizationUrl, project, repositoryName, pullRequestId }) => {
try {
const service = new azure_devops_service_js_1.AzureDevOpsService();
const basicInfo = await service.getPRBasicInfo(organizationUrl, project, repositoryName, pullRequestId);
return {
content: [{
type: "text",
text: JSON.stringify(basicInfo, null, 2)
}]
};
}
catch (error) {
throw new Error(`Error retrieving PR basic info: ${error instanceof Error ? error.message : String(error)}`);
}
}
};
//# sourceMappingURL=get-pr-basic-info.js.map