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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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", [])
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return format ('JSON string with list of branch names'), which is helpful, but fails to address critical aspects like error handling (e.g., what happens if the project doesn't exist), authentication requirements, rate limits, or pagination. This leaves significant gaps in understanding the tool's behavior.

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 well-structured and front-loaded, starting with the core purpose, followed by clear sections for arguments and returns. Every sentence adds value without redundancy, making it efficient and easy to parse for an AI agent.

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

Completeness3/5

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

Given the tool's low complexity (2 parameters, no nested objects) and the presence of an output schema, the description is somewhat complete. It covers the basic purpose and parameters but lacks details on error cases, authentication, and usage context. The output schema likely defines the return structure, so the description's mention of a 'JSON string' is adequate but not exhaustive.

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?

The description includes an 'Args' section that explains the parameters ('project' and 'namespace'), adding meaning beyond the input schema, which has 0% description coverage. It clarifies that 'namespace' defaults to 'rpms' and that 'project' is required. However, it does not provide examples or constraints (e.g., format of project names), so it only partially compensates for the low schema coverage.

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 tool's purpose: 'List all branches in a Pagure repository.' It specifies the verb ('List') and resource ('branches in a Pagure repository'), making the action unambiguous. However, it does not explicitly differentiate from sibling tools like 'list_projects' or 'list_pull_requests,' which prevents a score of 5.

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 lacks context about prerequisites, such as whether the repository must exist or be accessible, and does not mention sibling tools like 'list_projects' for broader repository listings. This absence of usage context limits its effectiveness for an AI agent.

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

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