Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

create_repository

Create a new repository in a Bitbucket Cloud workspace with configurable settings for privacy, language, issue tracking, and project assignment.

Instructions

Create a new repository in the specified workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
nameNoRepository name
descriptionNoRepository description
is_privateNoWhether the repository is private
languageNoPrimary language
has_issuesNoEnable issue tracker
has_wikiNoEnable wiki
project_keyNoProject key to add repo to

Implementation Reference

  • Core handler function that executes the repository creation by making a POST request to the Bitbucket API endpoint.
    async create(params: CreateRepositoryParams): Promise<BitbucketRepository> {
      const { workspace, repo_slug, ...body } = params;
      return this.client.post<BitbucketRepository>(`/repositories/${workspace}/${repo_slug}`, body);
    }
  • Dispatch handler in ToolHandler that validates input with Zod schema and delegates to RepositoriesAPI.create method.
    case 'create_repository': {
      const params = toolSchemas.create_repository.parse(args);
      return this.repos.create(params);
  • Zod schema definition for validating create_repository tool parameters.
    create_repository: z.object({
      workspace: z.string().describe('The workspace slug'),
      repo_slug: z.string().describe('The repository slug'),
      name: z.string().optional().describe('Repository name'),
      description: z.string().optional().describe('Repository description'),
      is_private: z.boolean().optional().describe('Whether the repository is private'),
      language: z.string().optional().describe('Primary language'),
      has_issues: z.boolean().optional().describe('Enable issue tracker'),
      has_wiki: z.boolean().optional().describe('Enable wiki'),
      project_key: z.string().optional().describe('Project key to add repo to'),
    }),
  • MCP tool registration in toolDefinitions array, defining name, description, and input schema for the LLM.
    {
      name: 'create_repository',
      description: 'Create a new repository in the specified workspace.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          workspace: { type: 'string', description: 'The workspace slug' },
          repo_slug: { type: 'string', description: 'The repository slug' },
          name: { type: 'string', description: 'Repository name' },
          description: { type: 'string', description: 'Repository description' },
          is_private: { type: 'boolean', description: 'Whether the repository is private' },
          language: { type: 'string', description: 'Primary language' },
          has_issues: { type: 'boolean', description: 'Enable issue tracker' },
          has_wiki: { type: 'boolean', description: 'Enable wiki' },
          project_key: { type: 'string', description: 'Project key to add repo to' },
        },
        required: ['workspace', 'repo_slug'],
      },
    },
  • TypeScript interface defining the parameters for create_repository.
    export interface CreateRepositoryParams {
      workspace: string;
      repo_slug: string;
      name?: string;
      description?: string;
      is_private?: boolean;
      language?: string;
      has_issues?: boolean;
      has_wiki?: boolean;
      project_key?: string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as required permissions, whether creation is idempotent, rate limits, error conditions, or what happens on success (e.g., returns a repository object). This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste. It's front-loaded with the core action and resource, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 9 parameters, no annotations, and no output schema, the description is incomplete. It lacks context on permissions, behavioral details, and expected outcomes, which are crucial for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 9 parameters. The description adds no additional meaning beyond implying a 'workspace' parameter, which is already covered. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new repository in the specified workspace'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_branch' or 'create_issue' beyond the resource type, which is why it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., workspace permissions), when not to use it, or how it relates to siblings like 'get_repository' or 'list_repositories' for checking existing repos first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lexmata/bitbucket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server