@aashari/mcp-server-atlassian-bitbucket
Version:
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MC
100 lines (99 loc) • 4.03 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommitDiffArgsSchema = exports.BranchDiffArgsSchema = void 0;
const zod_1 = require("zod");
/**
* Schema for the branch diff tool arguments
*/
exports.BranchDiffArgsSchema = zod_1.z.object({
/**
* Workspace slug containing the repository
*/
workspaceSlug: zod_1.z
.string()
.optional()
.describe('Workspace slug containing the repository. If not provided, the system will use your default workspace (either configured via BITBUCKET_DEFAULT_WORKSPACE or the first workspace in your account). Example: "myteam"'),
/**
* Repository slug containing the branches
*/
repoSlug: zod_1.z
.string()
.min(1, 'Repository slug is required')
.describe('Repository slug containing the branches. Must be a valid repository slug in the specified workspace. Example: "project-api"'),
/**
* Source branch (feature branch)
*/
sourceBranch: zod_1.z
.string()
.min(1, 'Source branch is required')
.describe('Source branch for comparison. IMPORTANT NOTE: The output displays as "destinationBranch → sourceBranch", and parameter naming can be counterintuitive. For full code diffs, try both parameter orders if initial results show only summary. Example: "feature/login-redesign"'),
/**
* Destination branch (target branch like main/master)
*/
destinationBranch: zod_1.z
.string()
.optional()
.describe('Destination branch for comparison. IMPORTANT NOTE: The output displays as "destinationBranch → sourceBranch", and parameter naming can be counterintuitive. For full code diffs, try both parameter orders if initial results show only summary. If not specified, defaults to "main". Example: "develop"'),
/**
* Include full diff in the output
*/
includeFullDiff: zod_1.z
.boolean()
.optional()
.describe('Whether to include the full code diff in the output. Defaults to true for rich output.'),
/**
* Maximum number of files to return per page
*/
limit: zod_1.z
.number()
.int()
.positive()
.optional()
.describe('Maximum number of changed files to return in results'),
/**
* Pagination cursor for retrieving additional results
*/
cursor: zod_1.z
.number()
.int()
.positive()
.optional()
.describe('Pagination cursor for retrieving additional results'),
});
/**
* Schema for the commit diff tool arguments
*/
exports.CommitDiffArgsSchema = zod_1.z.object({
workspaceSlug: zod_1.z
.string()
.optional()
.describe('Workspace slug containing the repository. If not provided, the system will use your default workspace.'),
repoSlug: zod_1.z
.string()
.min(1)
.describe('Repository slug to compare commits in'),
sinceCommit: zod_1.z
.string()
.min(1)
.describe('Base commit hash or reference. IMPORTANT NOTE: For proper results with code changes, this should be the NEWER commit (chronologically later). If you see "No changes detected", try reversing commit order.'),
untilCommit: zod_1.z
.string()
.min(1)
.describe('Target commit hash or reference. IMPORTANT NOTE: For proper results with code changes, this should be the OLDER commit (chronologically earlier). If you see "No changes detected", try reversing commit order.'),
includeFullDiff: zod_1.z
.boolean()
.optional()
.describe('Whether to include the full code diff in the response (default: false)'),
limit: zod_1.z
.number()
.int()
.positive()
.optional()
.describe('Maximum number of changed files to return in results'),
cursor: zod_1.z
.number()
.int()
.positive()
.optional()
.describe('Pagination cursor for retrieving additional results'),
});