Skip to main content
Glama
lemenkov
by lemenkov

list_branches

Retrieve all branch names from a Pagure repository by specifying the project and optional namespace to manage repository structure and workflows.

Instructions

List all branches in a Pagure repository.

Args: project: Project name namespace: Project namespace (default: rpms)

Returns: JSON string with list of branch names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
namespaceNorpms

Implementation Reference

  • The actual implementation of the list_branches tool logic in the PagureClient class.
    async def list_branches(
        self,
        project: str,
        namespace: str = "rpms",
    ) -> List[str]:
        """List repository branches.
    
        Args:
            project: Project name
            namespace: Project namespace
    
        Returns:
            List of branch names
        """
        response = await self.client.get(
            f"{self.api_base}/{namespace}/{project}/git/branches",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        data = response.json()
        return data.get("branches", [])

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/lemenkov/mcp-pagure'

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