Skip to main content
Glama

get_group_permission

Retrieve permission levels for specific groups on Bitbucket repositories to manage access control and security settings.

Instructions

Get a specific group's permission for a repository.

Args: repo_slug: Repository slug group_slug: Group slug Returns: Group's permission level

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
group_slugYes

Implementation Reference

  • MCP tool handler function that calls BitbucketClient.get_group_permission and formats the response using GroupPermission model.
    @mcp.tool() @handle_bitbucket_error @formatted def get_group_permission(repo_slug: str, group_slug: str) -> dict: """Get a specific group's permission for a repository. Args: repo_slug: Repository slug group_slug: Group slug Returns: Group's permission level """ client = get_client() result = client.get_group_permission(repo_slug, group_slug) if not result: return not_found_response("Group permission", group_slug) return GroupPermission.from_api(result).model_dump()
  • BitbucketClient helper method that makes the HTTP GET request to retrieve group permission from Bitbucket API.
    def get_group_permission( self, repo_slug: str, group_slug: str ) -> Optional[dict[str, Any]]: """Get permission for a specific group. Args: repo_slug: Repository slug group_slug: Group slug Returns: Group permission info or None if not found """ return self._request( "GET", self._repo_path(repo_slug, "permissions-config", "groups", group_slug), )
  • Pydantic model defining the structure for group permission data, used for output serialization and validation.
    class GroupPermission(BaseModel): """Group permission info.""" group: Optional[str] = None slug: Optional[str] = None permission: str @classmethod def from_api(cls, data: dict) -> "GroupPermission": group_data = data.get("group") or {} return cls( group=group_data.get("name"), slug=group_data.get("slug"), permission=data.get("permission", ""), )

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/JaviMaligno/mcp-server-bitbucket'

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