Skip to main content
Glama
lemenkov
by lemenkov

close_pull_request

Close a pull request without merging it in Pagure git forges. Use this tool to end pull request workflows when changes are not needed.

Instructions

Close a pull request without merging.

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

Returns: JSON string with close result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
pr_idYes
namespaceNorpms

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core API logic for closing a pull request, implemented in the PagureClient class.
    async def close_pull_request(
        self,
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> Dict[str, Any]:
        """Close a pull request without merging.
    
        Args:
            project: Project name
            pr_id: Pull request ID
            namespace: Project namespace
    
        Returns:
            Close result
        """
        response = await self.client.post(
            f"{self.api_base}/{namespace}/{project}/pull-request/{pr_id}/close",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()
  • MCP tool registration and wrapper function for closing a pull request.
    async def close_pull_request(
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> str:
        """Close a pull request without merging.
    
        Args:
            project: Project name
            pr_id: Pull request ID number to close
            namespace: Project namespace (default: rpms)
    
        Returns:
            JSON string with close result
        """
        client = get_client()
        result = await client.close_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?

No annotations are provided, so the description carries the full burden. It mentions the action ('Close a pull request') but lacks details on behavioral traits such as required permissions, whether the action is reversible, potential side effects, or rate limits. This is a significant gap for a mutation tool with no 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.

Conciseness5/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. Every sentence earns its place, with no wasted words, making it efficient and easy to parse.

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 complexity of a mutation tool with no annotations, the description covers the purpose, parameters, and return type. However, it lacks details on behavioral aspects like permissions or side effects. The presence of an output schema reduces the need to explain return values, but more context on the tool's impact would improve completeness.

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 lists all three parameters (project, pr_id, namespace) with brief explanations, adding meaning beyond the bare schema. However, it does not provide detailed semantics like format examples or constraints, so it doesn't fully bridge the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Close a pull request') and distinguishes it from alternatives ('without merging'), which differentiates it from the sibling tool 'merge_pull_request'. It directly addresses what the tool does in a precise manner.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying 'without merging', which suggests when to use this tool versus 'merge_pull_request'. However, it does not explicitly state when not to use it or mention other alternatives like 'comment_on_pr' for non-closure actions, leaving some guidance implicit.

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