Skip to main content
Glama
lemenkov
by lemenkov

list_pull_requests

Retrieve pull requests from Pagure projects with filtering by status and pagination controls to manage code review workflows.

Instructions

List pull requests for a Pagure project.

Args: project: Project name namespace: Project namespace (default: rpms) status: PR status - Open, Merged, Closed, or all (default: Open) page: Page number (default: 1) per_page: Results per page (default: 20)

Returns: JSON string with PR list and pagination info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
namespaceNorpms
statusNoOpen
pageNo
per_pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The API client method that performs the actual network request to list pull requests from the Pagure API.
    async def list_pull_requests(
        self,
        project: str,
        namespace: str = "rpms",
        status: str = "Open",
        page: int = 1,
        per_page: int = 20,
    ) -> Dict[str, Any]:
        """List pull requests.
    
        Args:
            project: Project name
            namespace: Project namespace
            status: PR status (Open, Merged, Closed, all)
            page: Page number
            per_page: Results per page
    
        Returns:
            Dict with PRs and pagination info
        """
        params = {
            "status": status,
            "page": page,
            "per_page": per_page,
        }
    
        response = await self.client.get(
            f"{self.api_base}/{namespace}/{project}/pull-requests",
            params=params,
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()
  • The MCP tool handler registration for list_pull_requests, which invokes the PagureClient method.
    async def list_pull_requests(
        project: str,
        namespace: str = "rpms",
        status: str = "Open",
        page: int = 1,
        per_page: int = 20,
    ) -> str:
        """List pull requests for a Pagure project.
    
        Args:
            project: Project name
            namespace: Project namespace (default: rpms)
            status: PR status - Open, Merged, Closed, or all (default: Open)
            page: Page number (default: 1)
            per_page: Results per page (default: 20)
    
        Returns:
            JSON string with PR list and pagination info
        """
        client = get_client()
        result = await client.list_pull_requests(project, namespace, status, page, per_page)
    
        import json
        return json.dumps(result, indent=2)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions pagination and JSON return format, which is helpful, but doesn't cover important aspects like authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though 'list' implies it).

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 efficiently structured with a clear purpose statement followed by well-organized parameter documentation and return information. Every sentence serves a purpose with no redundant or unnecessary content.

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

Completeness4/5

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

Given the tool's moderate complexity (5 parameters, pagination) and the presence of an output schema (which handles return values), the description provides good coverage. It explains all parameters thoroughly and mentions the JSON return format. The main gap is lack of guidance on when to use this versus sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides clear documentation for all 5 parameters including their purposes, defaults, and valid values for 'status'. This adds significant value beyond the bare schema, though it could explain parameter relationships or constraints more fully.

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 verb ('List') and resource ('pull requests for a Pagure project'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'get_pull_request' (singular vs. plural), which could cause confusion about when to use each.

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 like 'get_pull_request' (for single PR details) or 'list_projects' (for project listing). It also doesn't mention prerequisites or typical use cases, leaving the agent to infer appropriate contexts.

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