@tiberriver256/mcp-server-azure-devops
Version:
Azure DevOps reference server for the Model Context Protocol (MCP)
125 lines • 4.46 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetAllRepositoriesTreeSchema = exports.GetFileContentSchema = exports.ListRepositoriesSchema = exports.GetRepositoryDetailsSchema = exports.GetRepositorySchema = void 0;
const zod_1 = require("zod");
const environment_1 = require("../../utils/environment");
/**
* Schema for getting a repository
*/
exports.GetRepositorySchema = zod_1.z.object({
projectId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
organizationId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
repositoryId: zod_1.z.string().describe('The ID or name of the repository'),
});
/**
* Schema for getting detailed repository information
*/
exports.GetRepositoryDetailsSchema = zod_1.z.object({
projectId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
organizationId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
repositoryId: zod_1.z.string().describe('The ID or name of the repository'),
includeStatistics: zod_1.z
.boolean()
.optional()
.default(false)
.describe('Whether to include branch statistics'),
includeRefs: zod_1.z
.boolean()
.optional()
.default(false)
.describe('Whether to include repository refs'),
refFilter: zod_1.z
.string()
.optional()
.describe('Optional filter for refs (e.g., "heads/" or "tags/")'),
branchName: zod_1.z
.string()
.optional()
.describe('Name of specific branch to get statistics for (if includeStatistics is true)'),
});
/**
* Schema for listing repositories
*/
exports.ListRepositoriesSchema = zod_1.z.object({
projectId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
organizationId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
includeLinks: zod_1.z
.boolean()
.optional()
.describe('Whether to include reference links'),
});
/**
* Schema for getting file content
*/
exports.GetFileContentSchema = zod_1.z.object({
projectId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
organizationId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
repositoryId: zod_1.z.string().describe('The ID or name of the repository'),
path: zod_1.z
.string()
.optional()
.default('/')
.describe('Path to the file or folder'),
version: zod_1.z
.string()
.optional()
.describe('The version (branch, tag, or commit) to get content from'),
versionType: zod_1.z
.enum(['branch', 'commit', 'tag'])
.optional()
.describe('Type of version specified (branch, commit, or tag)'),
});
/**
* Schema for getting all repositories tree structure
*/
exports.GetAllRepositoriesTreeSchema = zod_1.z.object({
organizationId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the Azure DevOps organization (Default: ${environment_1.defaultOrg})`),
projectId: zod_1.z
.string()
.optional()
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
repositoryPattern: zod_1.z
.string()
.optional()
.describe('Repository name pattern (wildcard characters allowed) to filter which repositories are included'),
depth: zod_1.z
.number()
.int()
.min(0)
.max(10)
.optional()
.default(0)
.describe('Maximum depth to traverse within each repository (0 = unlimited)'),
pattern: zod_1.z
.string()
.optional()
.describe('File pattern (wildcard characters allowed) to filter files by within each repository'),
});
//# sourceMappingURL=schemas.js.map