Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port for HTTP server mode (usually auto-set by deployment platform) | 8080 |
| OUTPUT_FORMAT | No | Output format for responses (json or toon). TOON format provides ~30-40% token savings. | json |
| BITBUCKET_EMAIL | Yes | Your Bitbucket account email | |
| BITBUCKET_API_TOKEN | Yes | Your Bitbucket repository access token | |
| BITBUCKET_WORKSPACE | Yes | Your Bitbucket workspace slug |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_repository | 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_repository | 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_repository | Delete a Bitbucket repository. WARNING: This action is irreversible!
Args:
repo_slug: Repository slug to delete
Returns:
Success status |
| list_repositories | 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_request | 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_request | 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_requests | 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_request | 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_pipeline | Trigger a pipeline run on a repository. Args:
repo_slug: Repository slug
branch: Branch to run pipeline on (default: main)
variables: Custom pipeline variables as key-value pairs (optional)
Returns:
Pipeline run info with uuid and state |
| get_pipeline | 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_pipelines | 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_logs | 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_pipeline | Stop a running pipeline. Args:
repo_slug: Repository slug
pipeline_uuid: Pipeline UUID
Returns:
Updated pipeline status |
| list_pipeline_variables | 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_variable | 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_variable | 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_variable | 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_variable | Delete a pipeline variable. Args:
repo_slug: Repository slug
variable_uuid: Variable UUID (from list_pipeline_variables)
Returns:
Confirmation of deletion |
| list_projects | List projects in the workspace. Args:
limit: Maximum number of results (default: 50)
Returns:
List of projects with key, name, and description |
| get_project | Get information about a specific project. Args:
project_key: Project key (e.g., "DS", "PROJ")
Returns:
Project info including name, description, and metadata |
| update_repository | 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_branches | 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_branch | Get information about a specific branch. Args:
repo_slug: Repository slug
branch_name: Branch name
Returns:
Branch info with latest commit details |
| list_commits | List commits in a repository. Args:
repo_slug: Repository slug
branch: Filter by branch name (optional)
path: Filter by file path - only commits that modified this path (optional)
limit: Maximum number of results (default: 20)
Returns:
List of commits with hash, message, author, and date |
| get_commit | 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_commits | Compare two commits or branches and see files changed. Args:
repo_slug: Repository slug
base: Base commit hash or branch name
head: Head commit hash or branch name
Returns:
Diff statistics showing files added, modified, and removed |
| get_commit_statuses | 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_status | 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_comments | 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_comment | 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_pr | Approve a pull request. Args:
repo_slug: Repository slug
pr_id: Pull request ID
Returns:
Approval confirmation |
| unapprove_pr | Remove your approval from a pull request. Args:
repo_slug: Repository slug
pr_id: Pull request ID
Returns:
Confirmation of approval removal |
| request_changes_pr | Request changes on a pull request. Args:
repo_slug: Repository slug
pr_id: Pull request ID
Returns:
Confirmation of change request |
| decline_pr | Decline (close without merging) a pull request. Args:
repo_slug: Repository slug
pr_id: Pull request ID
Returns:
Declined PR info |
| get_pr_diff | Get the diff of a pull request. Args:
repo_slug: Repository slug
pr_id: Pull request ID
Returns:
Diff content as text |
| list_environments | 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_environment | 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_history | 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_webhooks | 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_webhook | 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_webhook | 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_webhook | Delete a webhook. Args:
repo_slug: Repository slug
webhook_uuid: Webhook UUID (from list_webhooks)
Returns:
Confirmation of deletion |
| list_tags | List tags in a repository. Args:
repo_slug: Repository slug
limit: Maximum number of results (default: 50)
Returns:
List of tags with name, target commit, and tagger info |
| create_tag | 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_tag | Delete a tag from a repository. Args:
repo_slug: Repository slug
tag_name: Tag name to delete
Returns:
Confirmation of deletion |
| list_branch_restrictions | 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_restriction | 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_restriction | Delete a branch restriction. Args:
repo_slug: Repository slug
restriction_id: Restriction ID (from list_branch_restrictions)
Returns:
Confirmation of deletion |
| get_file_content | 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_directory | 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_permissions | 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_permission | 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_permission | 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_permission | 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_permissions | 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_permission | 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_permission | 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_permission | 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
| Name | Description |
|---|---|
| code_review | Generate 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_notes | Generate 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_debug | Debug a failed pipeline. Args: repo_slug: Repository slug Returns: Prompt for debugging pipeline failures |
| repo_summary | Get 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
| Name | Description |
|---|---|
| resource_repositories | List all repositories in the workspace. Returns a summary of repositories for browsing. |
| resource_projects | List all projects in the workspace. |