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

242 lines (241 loc) 8.77 kB
import { z } from 'zod'; /** * Bitbucket search tool arguments schema base */ export declare const SearchToolArgsBase: z.ZodObject<{ /** * Workspace slug to search in. Example: "myteam" * This maps to the CLI's "--workspace" parameter. */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Optional: Repository slug to limit search scope. Required for `pullrequests` scope. Example: "project-api" * This maps to the CLI's "--repo" parameter. */ repoSlug: z.ZodOptional<z.ZodString>; /** * Search query text. Required. Will match against content based on the selected search scope. * This maps to the CLI's "--query" parameter. */ query: z.ZodString; /** * Search scope: "code", "content", "repositories", "pullrequests". Default: "code" * This maps to the CLI's "--type" parameter. */ scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["code", "content", "repositories", "pullrequests"]>>>; /** * Content type for content search (e.g., "wiki", "issue") * This maps to the CLI's "--content-type" parameter. */ contentType: z.ZodOptional<z.ZodString>; /** * Filter code search by language. * This maps to the CLI's "--language" parameter. */ language: z.ZodOptional<z.ZodString>; /** * Filter code search by file extension. * This maps to the CLI's "--extension" parameter. */ extension: z.ZodOptional<z.ZodString>; } & { /** * Maximum number of items to return (1-100). * Use this to control the response size. * Useful for pagination or when you only need a few results. */ limit: z.ZodOptional<z.ZodNumber>; /** * Pagination cursor for retrieving the next set of results. * For repositories and pull requests, this is a cursor string. * For code search, this is a page number. * Use this to navigate through large result sets. */ cursor: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { query: string; scope: "code" | "repositories" | "content" | "pullrequests"; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; }, { query: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; scope?: "code" | "repositories" | "content" | "pullrequests" | undefined; }>; /** * Bitbucket search tool arguments schema with validation */ export declare const SearchToolArgs: z.ZodEffects<z.ZodObject<{ /** * Workspace slug to search in. Example: "myteam" * This maps to the CLI's "--workspace" parameter. */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Optional: Repository slug to limit search scope. Required for `pullrequests` scope. Example: "project-api" * This maps to the CLI's "--repo" parameter. */ repoSlug: z.ZodOptional<z.ZodString>; /** * Search query text. Required. Will match against content based on the selected search scope. * This maps to the CLI's "--query" parameter. */ query: z.ZodString; /** * Search scope: "code", "content", "repositories", "pullrequests". Default: "code" * This maps to the CLI's "--type" parameter. */ scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["code", "content", "repositories", "pullrequests"]>>>; /** * Content type for content search (e.g., "wiki", "issue") * This maps to the CLI's "--content-type" parameter. */ contentType: z.ZodOptional<z.ZodString>; /** * Filter code search by language. * This maps to the CLI's "--language" parameter. */ language: z.ZodOptional<z.ZodString>; /** * Filter code search by file extension. * This maps to the CLI's "--extension" parameter. */ extension: z.ZodOptional<z.ZodString>; } & { /** * Maximum number of items to return (1-100). * Use this to control the response size. * Useful for pagination or when you only need a few results. */ limit: z.ZodOptional<z.ZodNumber>; /** * Pagination cursor for retrieving the next set of results. * For repositories and pull requests, this is a cursor string. * For code search, this is a page number. * Use this to navigate through large result sets. */ cursor: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { query: string; scope: "code" | "repositories" | "content" | "pullrequests"; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; }, { query: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; scope?: "code" | "repositories" | "content" | "pullrequests" | undefined; }>, { query: string; scope: "code" | "repositories" | "content" | "pullrequests"; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; }, { query: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; scope?: "code" | "repositories" | "content" | "pullrequests" | undefined; }>; export declare const SearchToolArgsSchema: z.ZodObject<{ /** * Workspace slug to search in. Example: "myteam" * This maps to the CLI's "--workspace" parameter. */ workspaceSlug: z.ZodOptional<z.ZodString>; /** * Optional: Repository slug to limit search scope. Required for `pullrequests` scope. Example: "project-api" * This maps to the CLI's "--repo" parameter. */ repoSlug: z.ZodOptional<z.ZodString>; /** * Search query text. Required. Will match against content based on the selected search scope. * This maps to the CLI's "--query" parameter. */ query: z.ZodString; /** * Search scope: "code", "content", "repositories", "pullrequests". Default: "code" * This maps to the CLI's "--type" parameter. */ scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<["code", "content", "repositories", "pullrequests"]>>>; /** * Content type for content search (e.g., "wiki", "issue") * This maps to the CLI's "--content-type" parameter. */ contentType: z.ZodOptional<z.ZodString>; /** * Filter code search by language. * This maps to the CLI's "--language" parameter. */ language: z.ZodOptional<z.ZodString>; /** * Filter code search by file extension. * This maps to the CLI's "--extension" parameter. */ extension: z.ZodOptional<z.ZodString>; } & { /** * Maximum number of items to return (1-100). * Use this to control the response size. * Useful for pagination or when you only need a few results. */ limit: z.ZodOptional<z.ZodNumber>; /** * Pagination cursor for retrieving the next set of results. * For repositories and pull requests, this is a cursor string. * For code search, this is a page number. * Use this to navigate through large result sets. */ cursor: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { query: string; scope: "code" | "repositories" | "content" | "pullrequests"; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; }, { query: string; cursor?: string | undefined; limit?: number | undefined; workspaceSlug?: string | undefined; language?: string | undefined; repoSlug?: string | undefined; contentType?: string | undefined; extension?: string | undefined; scope?: "code" | "repositories" | "content" | "pullrequests" | undefined; }>; export type SearchToolArgsType = z.infer<typeof SearchToolArgs>;