Skip to main content
Glama
lemenkov
by lemenkov

merge_pull_request

Merge approved pull requests in Pagure git forges to integrate changes into projects. Specify project, pull request ID, and optional namespace to complete merges.

Instructions

Merge an approved pull request.

Args: project: Project name pr_id: Pull request ID number to merge namespace: Project namespace (default: rpms)

Returns: JSON string with merge result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
pr_idYes
namespaceNorpms

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core implementation of the merge_pull_request method that makes the API request to the Pagure server.
    async def merge_pull_request(
        self,
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> Dict[str, Any]:
        """Merge a pull request.
    
        Args:
            project: Project name
            pr_id: Pull request ID
            namespace: Project namespace
    
        Returns:
            Merge result
        """
        response = await self.client.post(
            f"{self.api_base}/{namespace}/{project}/pull-request/{pr_id}/merge",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()
  • The wrapper function for the merge_pull_request tool that calls the client's merge_pull_request method.
    async def merge_pull_request(
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> str:
        """Merge an approved pull request.
    
        Args:
            project: Project name
            pr_id: Pull request ID number to merge
            namespace: Project namespace (default: rpms)
    
        Returns:
            JSON string with merge result
        """
        client = get_client()
        result = await client.merge_pull_request(project, pr_id, namespace)
    
        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 the full burden of behavioral disclosure. It states the tool merges pull requests, implying a write operation, but lacks details on permissions needed, whether merges are reversible, rate limits, or error conditions. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by structured sections for args and returns. It's efficient with minimal waste, though the 'Args' and 'Returns' sections could be integrated more seamlessly into natural language.

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 complexity (a mutation operation), lack of annotations, and 0% schema description coverage, the description is incomplete. It doesn't cover behavioral aspects like permissions or side effects. However, the presence of an output schema reduces the need to explain return values, providing some compensation.

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?

Schema description coverage is 0%, so the description must compensate. It lists parameters (project, pr_id, namespace) and adds a default value for namespace, providing basic semantics. However, it doesn't explain what 'project name' or 'namespace' mean in context, or format requirements, leaving gaps in understanding.

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 action ('merge') and target ('an approved pull request'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'close_pull_request' or 'comment_on_pr', which prevents a perfect score.

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 mentions 'an approved pull request', which implies a prerequisite condition but doesn't explicitly state when to use this tool versus alternatives like 'close_pull_request' or 'comment_on_pr'. No guidance is provided on exclusions or specific contexts, leaving usage ambiguous.

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