UNPKG

@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

309 lines (308 loc) 8.48 kB
import { z } from 'zod'; /** * Schema for list-pull-requests tool arguments */ export declare const ListPullRequestsToolArgs: z.ZodObject<{ limit: z.ZodOptional<z.ZodNumber>; cursor: z.ZodOptional<z.ZodString>; /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull requests */ repoSlug: z.ZodString; /** * Filter by pull request state */ state: z.ZodOptional<z.ZodEnum<["OPEN", "MERGED", "DECLINED", "SUPERSEDED"]>>; /** * Filter query for pull requests */ query: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { repoSlug: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; query?: string | undefined; state?: "OPEN" | "MERGED" | "DECLINED" | "SUPERSEDED" | undefined; }, { repoSlug: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; query?: string | undefined; state?: "OPEN" | "MERGED" | "DECLINED" | "SUPERSEDED" | undefined; }>; export type ListPullRequestsToolArgsType = z.infer<typeof ListPullRequestsToolArgs>; /** * Schema for get-pull-request tool arguments */ export declare const GetPullRequestToolArgs: z.ZodObject<{ /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull request */ repoSlug: z.ZodString; /** * Pull request identifier */ prId: z.ZodString; /** * Optional flag to request the full diff */ includeFullDiff: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; /** * Optional flag to include comments */ includeComments: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { repoSlug: string; prId: string; includeFullDiff: boolean; includeComments: boolean; workspaceSlug?: string | undefined; }, { repoSlug: string; prId: string; workspaceSlug?: string | undefined; includeFullDiff?: boolean | undefined; includeComments?: boolean | undefined; }>; export type GetPullRequestToolArgsType = z.infer<typeof GetPullRequestToolArgs>; /** * Schema for list-pr-comments tool arguments */ export declare const ListPullRequestCommentsToolArgs: z.ZodObject<{ limit: z.ZodOptional<z.ZodNumber>; cursor: z.ZodOptional<z.ZodString>; /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull request */ repoSlug: z.ZodString; /** * Pull request identifier */ prId: z.ZodString; }, "strip", z.ZodTypeAny, { repoSlug: string; prId: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; }, { repoSlug: string; prId: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; }>; export type ListPullRequestCommentsToolArgsType = z.infer<typeof ListPullRequestCommentsToolArgs>; /** * Schema for create-pr-comment tool arguments */ export declare const CreatePullRequestCommentToolArgs: z.ZodObject<{ /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull request */ repoSlug: z.ZodString; /** * Pull request identifier */ prId: z.ZodString; /** * Comment content */ content: z.ZodString; /** * Optional inline location for the comment */ inline: z.ZodOptional<z.ZodObject<{ path: z.ZodString; line: z.ZodNumber; }, "strip", z.ZodTypeAny, { path: string; line: number; }, { path: string; line: number; }>>; parentId: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { content: string; repoSlug: string; prId: string; workspaceSlug?: string | undefined; inline?: { path: string; line: number; } | undefined; parentId?: string | undefined; }, { content: string; repoSlug: string; prId: string; workspaceSlug?: string | undefined; inline?: { path: string; line: number; } | undefined; parentId?: string | undefined; }>; /** * Type for create pull request comment tool arguments (inferred from schema) */ export type CreatePullRequestCommentToolArgsType = z.infer<typeof CreatePullRequestCommentToolArgs>; /** * Arguments schema for the pull_requests_create tool */ export declare const CreatePullRequestToolArgs: z.ZodObject<{ /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug to create the pull request in */ repoSlug: z.ZodString; /** * Title of the pull request */ title: z.ZodString; /** * Source branch name */ sourceBranch: z.ZodString; /** * Destination branch name */ destinationBranch: z.ZodOptional<z.ZodString>; /** * Description for the pull request */ description: z.ZodOptional<z.ZodString>; /** * Whether to close the source branch after merge */ closeSourceBranch: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { title: string; repoSlug: string; sourceBranch: string; workspaceSlug?: string | undefined; description?: string | undefined; destinationBranch?: string | undefined; closeSourceBranch?: boolean | undefined; }, { title: string; repoSlug: string; sourceBranch: string; workspaceSlug?: string | undefined; description?: string | undefined; destinationBranch?: string | undefined; closeSourceBranch?: boolean | undefined; }>; export type CreatePullRequestToolArgsType = z.infer<typeof CreatePullRequestToolArgs>; /** * Schema for update-pull-request tool arguments */ export declare const UpdatePullRequestToolArgs: z.ZodObject<{ /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull request */ repoSlug: z.ZodString; /** * Pull request ID */ pullRequestId: z.ZodNumber; /** * Updated title for the pull request */ title: z.ZodOptional<z.ZodString>; /** * Updated description for the pull request */ description: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { repoSlug: string; pullRequestId: number; title?: string | undefined; workspaceSlug?: string | undefined; description?: string | undefined; }, { repoSlug: string; pullRequestId: number; title?: string | undefined; workspaceSlug?: string | undefined; description?: string | undefined; }>; export type UpdatePullRequestToolArgsType = z.infer<typeof UpdatePullRequestToolArgs>; /** * Schema for approve-pull-request tool arguments */ export declare const ApprovePullRequestToolArgs: z.ZodObject<{ /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull request */ repoSlug: z.ZodString; /** * Pull request ID */ pullRequestId: z.ZodNumber; }, "strip", z.ZodTypeAny, { repoSlug: string; pullRequestId: number; workspaceSlug?: string | undefined; }, { repoSlug: string; pullRequestId: number; workspaceSlug?: string | undefined; }>; export type ApprovePullRequestToolArgsType = z.infer<typeof ApprovePullRequestToolArgs>; /** * Schema for reject-pull-request tool arguments */ export declare const RejectPullRequestToolArgs: z.ZodObject<{ /** * Workspace slug containing the repository */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Repository slug containing the pull request */ repoSlug: z.ZodString; /** * Pull request ID */ pullRequestId: z.ZodNumber; }, "strip", z.ZodTypeAny, { repoSlug: string; pullRequestId: number; workspaceSlug?: string | undefined; }, { repoSlug: string; pullRequestId: number; workspaceSlug?: string | undefined; }>; export type RejectPullRequestToolArgsType = z.infer<typeof RejectPullRequestToolArgs>;