Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoPort for HTTP server mode (usually auto-set by deployment platform)8080
OUTPUT_FORMATNoOutput format for responses (json or toon). TOON format provides ~30-40% token savings.json
BITBUCKET_EMAILYesYour Bitbucket account email
BITBUCKET_API_TOKENYesYour Bitbucket repository access token
BITBUCKET_WORKSPACEYesYour Bitbucket workspace slug

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_repositoryB

Get information about a Bitbucket repository.

Args:
    repo_slug: Repository slug (e.g., "anzsic_classifier")

Returns:
    Repository info including name, description, clone URLs, and metadata
create_repositoryB

Create a new Bitbucket repository.

Args:
    repo_slug: Repository slug (lowercase, no spaces)
    project_key: Project key to create repo under (optional)
    is_private: Whether repository is private (default: True)
    description: Repository description

Returns:
    Created repository info with clone URLs
delete_repositoryA

Delete a Bitbucket repository.

WARNING: This action is irreversible!

Args:
    repo_slug: Repository slug to delete

Returns:
    Success status
list_repositoriesA

List and search repositories in the workspace.

Args:
    project_key: Filter by project key (optional)
    search: Simple search term for repository name (optional)
            Uses fuzzy matching: search="anzsic" finds "anzsic_classifier"
    query: Advanced Bitbucket query syntax (optional)
           Examples:
           - name ~ "api" (partial name match)
           - description ~ "classifier" (search description)
           - is_private = false (public repos only)
           - name ~ "test" AND is_private = true
    limit: Maximum number of results (default: 50, max: 100)

Returns:
    List of repositories with basic info
create_pull_requestA

Create a pull request in a Bitbucket repository.

Args:
    repo_slug: Repository slug (e.g., "anzsic_classifier")
    title: PR title
    source_branch: Source branch name
    destination_branch: Target branch (default: main)
    description: PR description in markdown
    close_source_branch: Delete source branch after merge (default: True)

Returns:
    Created PR info with id, url, and state
get_pull_requestC

Get information about a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    PR info including state, author, reviewers, and merge status
list_pull_requestsB

List pull requests in a repository.

Args:
    repo_slug: Repository slug
    state: Filter by state: OPEN, MERGED, DECLINED, SUPERSEDED (default: OPEN)
    limit: Maximum number of results (default: 20, max: 100)

Returns:
    List of PRs with basic info
merge_pull_requestB

Merge a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID
    merge_strategy: One of 'merge_commit', 'squash', 'fast_forward' (default: merge_commit)
    close_source_branch: Delete source branch after merge (default: True)
    message: Optional merge commit message

Returns:
    Merged PR info
trigger_pipelineA

Trigger a pipeline run on a repository.

Supports custom pipelines (from 'custom:' section in bitbucket-pipelines.yml)
and commit-based triggers.

Args:
    repo_slug: Repository slug
    branch: Branch to run pipeline on (default: main). Mutually exclusive with commit.
    commit: Commit hash to run pipeline on. Mutually exclusive with branch.
    custom_pipeline: Name of custom pipeline from 'custom:' section
                    (e.g., "deploy-staging", "dry-run")
    variables: Pipeline variables as list of {key, value, secured?} objects.
              Example: [{"key": "ENV", "value": "prod", "secured": false}]

Returns:
    Pipeline run info with uuid and state

Examples:
    # Default branch pipeline
    trigger_pipeline(repo_slug="my-repo")

    # Custom pipeline
    trigger_pipeline(repo_slug="my-repo", custom_pipeline="deploy-staging")

    # Custom pipeline on specific commit
    trigger_pipeline(repo_slug="my-repo", commit="abc123", custom_pipeline="dry-run")

    # With secured variables
    trigger_pipeline(repo_slug="my-repo", variables=[
        {"key": "ENV", "value": "prod"},
        {"key": "SECRET", "value": "xxx", "secured": true}
    ])
get_pipelineA

Get status of a pipeline run.

Args:
    repo_slug: Repository slug
    pipeline_uuid: Pipeline UUID (from trigger_pipeline)

Returns:
    Pipeline status including state, duration, and steps
list_pipelinesB

List recent pipeline runs for a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 10)

Returns:
    List of recent pipeline runs
get_pipeline_logsA

Get logs for a pipeline run.

If step_uuid is not provided, returns list of steps to choose from.

Args:
    repo_slug: Repository slug
    pipeline_uuid: Pipeline UUID
    step_uuid: Step UUID (optional, get from steps list first)

Returns:
    Pipeline logs or list of available steps
stop_pipelineC

Stop a running pipeline.

Args:
    repo_slug: Repository slug
    pipeline_uuid: Pipeline UUID

Returns:
    Updated pipeline status
list_pipeline_variablesB

List pipeline variables for a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 50)

Returns:
    List of pipeline variables with key, secured status, and value (if not secured)
get_pipeline_variableB

Get details about a specific pipeline variable.

Args:
    repo_slug: Repository slug
    variable_uuid: Variable UUID (from list_pipeline_variables)

Returns:
    Variable details including key, secured status, and value (if not secured)
create_pipeline_variableA

Create a pipeline variable.

Args:
    repo_slug: Repository slug
    key: Variable name (e.g., "PYPI_TOKEN", "AWS_SECRET_KEY")
    value: Variable value
    secured: Whether to encrypt the value (default: False).
             Secured variables cannot be read back from the API.

Returns:
    Created variable info with UUID
update_pipeline_variableC

Update a pipeline variable's value.

Args:
    repo_slug: Repository slug
    variable_uuid: Variable UUID (from list_pipeline_variables)
    value: New variable value

Returns:
    Updated variable info
delete_pipeline_variableB

Delete a pipeline variable.

Args:
    repo_slug: Repository slug
    variable_uuid: Variable UUID (from list_pipeline_variables)

Returns:
    Confirmation of deletion
list_projectsB

List projects in the workspace.

Args:
    limit: Maximum number of results (default: 50)

Returns:
    List of projects with key, name, and description
get_projectB

Get information about a specific project.

Args:
    project_key: Project key (e.g., "DS", "PROJ")

Returns:
    Project info including name, description, and metadata
update_repositoryA

Update repository settings (project, visibility, description, name).

Use this to move a repository to a different project, change visibility,
update description, or rename the repository.

Args:
    repo_slug: Repository slug (e.g., "anzsic_classifier")
    project_key: Move to different project (optional, e.g., "DS")
    is_private: Change visibility (optional)
    description: Update description (optional)
    name: Rename repository (optional)

Returns:
    Updated repository info
list_branchesB

List branches in a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 50)

Returns:
    List of branches with commit info
get_branchB

Get information about a specific branch.

Args:
    repo_slug: Repository slug
    branch_name: Branch name

Returns:
    Branch info with latest commit details
list_commitsA

List a page of commits, newest first, without cloning.

include selects commits reachable from any supplied branch/tag/hash; exclude
removes commits reachable from those revisions. For commits in v2 but not v1,
use include=["v2"], exclude=["v1"]. branch is an additional include alias.
path restricts changes to a file/directory. Follow next_cursor until has_more
is false. cursor preserves its issued filters/page size; limit (1-100) and
filters apply only to the first page. Absence from one page is not absence
from repository history.
get_commitC

Get detailed information about a specific commit.

Args:
    repo_slug: Repository slug
    commit: Commit hash (full or short)

Returns:
    Commit details including message, author, date, and parents
compare_commitsA

List changed files from base to head (git diff base head semantics).

Revisions can be branches, tags or hashes. Returns a complete page of file
statistics. Follow next_cursor for remaining files; cursor keeps its issued
filters and page size. Use get_commit_diff for actual changed lines.
get_commit_diffA

Read the raw diff from base to head, optionally restricted to a file.

Follows git diff base head semantics. A large response is clipped explicitly;
pass next_offset to read the next chunk with the same revisions/path. Pin
revisions to hashes when chunking so moving branches cannot change the diff.
max_chars is clamped to 1-100000. Bitbucket may reject oversized diffs (555);
narrow with path in that case. Binary differences may have no text patch.
get_merge_baseA

Get Bitbucket's best common ancestor of two branches, tags or hashes.

Useful for ancestry checks: compare the returned hash with a resolved commit.
Bitbucket returns one best ancestor, even if the graph has several.
get_file_historyA

List a file's history at a branch, tag or commit without cloning.

Returns paths and full commit hashes, preserving paths reported by Bitbucket
across renames. Use get_commit for author, message and date; Bitbucket omits
those from filehistory. Follow next_cursor until has_more is false.
cursor keeps its issued page size; limit only applies to the first page.
get_commit_statusesA

Get build/CI statuses for a commit.

Args:
    repo_slug: Repository slug
    commit: Commit hash
    limit: Maximum number of results (default: 20)

Returns:
    List of CI/CD statuses (builds, checks) for the commit
create_commit_statusA

Create a build status for a commit.

Use this to report CI/CD status from external systems.

Args:
    repo_slug: Repository slug
    commit: Commit hash
    state: Status state - one of: SUCCESSFUL, FAILED, INPROGRESS, STOPPED
    key: Unique identifier for this status (e.g., "my-ci-system")
    url: URL to the build details (optional)
    name: Display name for the status (optional)
    description: Status description (optional)

Returns:
    Created status info
list_pr_commentsB

List comments on a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID
    limit: Maximum number of results (default: 50)

Returns:
    List of comments with author, content, and timestamps
add_pr_commentB

Add a comment to a pull request.

Can add general comments or inline comments on specific lines.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID
    content: Comment content (markdown supported)
    file_path: File path for inline comment (optional)
    line: Line number for inline comment (optional, requires file_path)

Returns:
    Created comment info
approve_prB

Approve a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    Approval confirmation
unapprove_prA

Remove your approval from a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    Confirmation of approval removal
request_changes_prC

Request changes on a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    Confirmation of change request
decline_prA

Decline (close without merging) a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    Declined PR info
get_pr_diffC

Get the diff of a pull request.

Args:
    repo_slug: Repository slug
    pr_id: Pull request ID

Returns:
    Diff content as text
list_environmentsC

List deployment environments for a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 20)

Returns:
    List of environments (e.g., test, staging, production)
get_environmentC

Get details about a specific deployment environment.

Args:
    repo_slug: Repository slug
    environment_uuid: Environment UUID (from list_environments)

Returns:
    Environment details including restrictions and variables
list_deployment_historyB

Get deployment history for a specific environment.

Args:
    repo_slug: Repository slug
    environment_uuid: Environment UUID (from list_environments)
    limit: Maximum number of results (default: 20)

Returns:
    List of deployments with status, commit, and timestamps
list_webhooksA

List webhooks configured for a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 50)

Returns:
    List of webhooks with URL, events, and status
create_webhookA

Create a webhook for a repository.

Args:
    repo_slug: Repository slug
    url: URL to call when events occur
    events: List of events to trigger on. Common events:
            - repo:push (code pushed)
            - pullrequest:created, pullrequest:updated, pullrequest:merged
            - pullrequest:approved, pullrequest:unapproved
            - pullrequest:comment_created
    description: Webhook description (optional)
    active: Whether webhook is active (default: True)

Returns:
    Created webhook info with UUID
get_webhookB

Get details about a specific webhook.

Args:
    repo_slug: Repository slug
    webhook_uuid: Webhook UUID (from list_webhooks)

Returns:
    Webhook details including URL, events, and status
delete_webhookB

Delete a webhook.

Args:
    repo_slug: Repository slug
    webhook_uuid: Webhook UUID (from list_webhooks)

Returns:
    Confirmation of deletion
list_tagsA

List a page of tags with their target commits.

query is Bitbucket's tag filter (e.g. name ~ "v2"). sort defaults to target
commit date descending; use name/-name for natural version-name ordering.
Target date is not tag creation date or proof of ancestry. Follow next_cursor
until has_more is false. cursor retains its issued filters and page size.
get_tagB

Resolve an exact tag name without scanning pages; returns full target hash.

create_tagA

Create a new tag in a repository.

Args:
    repo_slug: Repository slug
    name: Tag name (e.g., "v1.0.0")
    target: Commit hash or branch name to tag
    message: Optional tag message (for annotated tags)

Returns:
    Created tag info
delete_tagC

Delete a tag from a repository.

Args:
    repo_slug: Repository slug
    tag_name: Tag name to delete

Returns:
    Confirmation of deletion
list_branch_restrictionsB

List branch restrictions (protection rules) in a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 50)

Returns:
    List of branch restrictions with kind, pattern, and settings
create_branch_restrictionA

Create a branch restriction (protection rule).

Args:
    repo_slug: Repository slug
    kind: Type of restriction. Common values:
          - "push" - Restrict who can push
          - "force" - Restrict force push
          - "delete" - Restrict branch deletion
          - "restrict_merges" - Restrict who can merge
          - "require_passing_builds_to_merge" - Require CI to pass
          - "require_approvals_to_merge" - Require PR approvals
          - "require_default_reviewer_approvals_to_merge"
          - "require_no_changes_requested"
          - "require_tasks_to_be_completed"
    pattern: Branch pattern (e.g., "main", "release/*"). Required for glob match.
    branch_match_kind: How to match branches - "glob" (pattern) or "branching_model" (development/production)
    branch_type: Branch type when using branching_model - "development", "production", or specific category
    value: Numeric value for restrictions that need it (e.g., number of required approvals)

Returns:
    Created restriction info with ID
delete_branch_restrictionB

Delete a branch restriction.

Args:
    repo_slug: Repository slug
    restriction_id: Restriction ID (from list_branch_restrictions)

Returns:
    Confirmation of deletion
get_file_contentA

Get the content of a file from a repository.

Read file contents without cloning the repository.

Args:
    repo_slug: Repository slug
    path: File path (e.g., "src/main.py", "README.md")
    ref: Branch, tag, or commit hash (default: "main")

Returns:
    File content as text (or error if binary/not found)
list_directoryA

List contents of a directory in a repository.

Browse repository structure without cloning.

Args:
    repo_slug: Repository slug
    path: Directory path (empty string for root)
    ref: Branch, tag, or commit hash (default: "main")
    limit: Maximum number of entries (default: 100)

Returns:
    List of files and directories with their types and sizes
list_user_permissionsB

List user permissions for a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 50)

Returns:
    List of users with their permission levels
get_user_permissionB

Get a specific user's permission for a repository.

Args:
    repo_slug: Repository slug
    selected_user: User's account_id or UUID

Returns:
    User's permission level
update_user_permissionC

Update or add a user's permission for a repository.

Args:
    repo_slug: Repository slug
    selected_user: User's account_id or UUID
    permission: Permission level - "read", "write", or "admin"

Returns:
    Updated permission info
delete_user_permissionB

Remove a user's explicit permission from a repository.

Args:
    repo_slug: Repository slug
    selected_user: User's account_id or UUID

Returns:
    Confirmation of removal
list_group_permissionsB

List group permissions for a repository.

Args:
    repo_slug: Repository slug
    limit: Maximum number of results (default: 50)

Returns:
    List of groups with their permission levels
get_group_permissionC

Get a specific group's permission for a repository.

Args:
    repo_slug: Repository slug
    group_slug: Group slug

Returns:
    Group's permission level
update_group_permissionB

Update or add a group's permission for a repository.

Args:
    repo_slug: Repository slug
    group_slug: Group slug
    permission: Permission level - "read", "write", or "admin"

Returns:
    Updated permission info
delete_group_permissionB

Remove a group's explicit permission from a repository.

Args:
    repo_slug: Repository slug
    group_slug: Group slug

Returns:
    Confirmation of removal

Prompts

Interactive templates invoked by user choice

NameDescription
code_reviewGenerate a code review prompt for a pull request. Args: repo_slug: Repository slug pr_id: Pull request ID Returns: Prompt for reviewing the PR
release_notesGenerate release notes from commits between two refs. Args: repo_slug: Repository slug base_tag: Base tag or commit (e.g., "v1.0.0") head: Head ref (default: "main") Returns: Prompt for generating release notes
pipeline_debugDebug a failed pipeline. Args: repo_slug: Repository slug Returns: Prompt for debugging pipeline failures
repo_summaryGet a comprehensive summary of a repository. Args: repo_slug: Repository slug Returns: Prompt for summarizing repository status

Resources

Contextual data attached and managed by the client

NameDescription
resource_repositoriesList all repositories in the workspace. Returns a summary of repositories for browsing.
resource_projectsList all projects in the workspace.

TDQS

B3.3/5.0

Scored across 62 tools

Disambiguation4/5

Most tools target clearly distinct resources and actions (repositories, PRs, pipelines, permissions, webhooks, tags, branches). A few adjacent commit/file-history tools and pipeline status/log tools require reading descriptions carefully, but overall boundaries are clear.

Naming Consistency4/5

Names overwhelmingly follow a verb_noun snake_case pattern such as list_repositories, get_commit, create_pull_request, and delete_webhook. The main inconsistency is mixing 'pr' abbreviations (approve_pr, get_pr_diff) with 'pull_request' forms (create_pull_request, list_pull_requests).

Tool Count2/5

With 62 tools, the surface is very heavy for a single MCP server and exceeds the range where an agent can easily scan and choose tools. While the breadth reflects Bitbucket's API, the set could likely be consolidated into fewer operation groups.

Completeness3/5

Coverage is strong in several areas: repositories, PR review/merge actions, pipeline variables, webhooks, tags, and permissions have near-complete lifecycles. However, notable gaps remain, including branch creation/deletion, file write/update operations, project write operations, and PR metadata updates.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues