Skip to main content
Glama
lemenkov
by lemenkov

get_commit

Retrieve detailed commit information from Pagure git forges by specifying project, commit hash, and namespace parameters.

Instructions

Get detailed information about a specific commit.

Args: project: Project name commit_hash: Commit hash (full or short) namespace: Project namespace (default: rpms)

Returns: JSON string with commit details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
commit_hashYes
namespaceNorpms

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool `get_commit` which serves as the entry point for the tool, calling the underlying Pagure client.
    @mcp.tool()
    async def get_commit(
        project: str,
        commit_hash: str,
        namespace: str = "rpms",
    ) -> str:
        """Get detailed information about a specific commit.
    
        Args:
            project: Project name
            commit_hash: Commit hash (full or short)
            namespace: Project namespace (default: rpms)
    
        Returns:
            JSON string with commit details
        """
        client = get_client()
        result = await client.get_commit(project, commit_hash, namespace)
    
        import json
        return json.dumps(result, indent=2)
  • The underlying PagureClient method that performs the actual API call to retrieve commit information.
    async def get_commit(
        self,
        project: str,
        commit_hash: str,
        namespace: str = "rpms",
    ) -> Dict[str, Any]:
        """Get commit details.
    
        Args:
            project: Project name
            commit_hash: Commit hash
            namespace: Project namespace
    
        Returns:
            Commit details
        """
        response = await self.client.get(
            f"{self.api_base}/{namespace}/{project}/c/{commit_hash}",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()
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 of behavioral disclosure. It states the tool returns 'JSON string with commit details,' which hints at output format, but lacks details on permissions, error handling, rate limits, or whether it's read-only. For a tool with no annotations, this is insufficient to inform safe and effective use.

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 well-structured and appropriately sized, with a clear purpose statement followed by parameter and return sections. It uses minimal sentences that earn their place, avoiding redundancy. A slight deduction for not being maximally front-loaded, as the 'Args' and 'Returns' sections could be integrated more seamlessly.

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 (3 parameters, 2 required), no annotations, and an output schema present, the description is reasonably complete. It covers the purpose, parameters, and return format, though it could improve by adding behavioral context like error cases or usage examples. The output schema reduces the need to explain return values in detail.

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 lists parameters in an 'Args' section with brief explanations, adding meaning beyond the input schema (which has 0% description coverage). It clarifies 'project' as 'Project name,' 'commit_hash' as 'Commit hash (full or short),' and 'namespace' with a default. However, it doesn't fully compensate for the schema gap, as it lacks examples, constraints, or format details for parameters.

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: 'Get detailed information about a specific commit.' It specifies the verb ('Get') and resource ('commit'), making the intent unambiguous. However, it doesn't differentiate from sibling tools like 'get_project_info' or 'get_file' beyond the resource type, 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 provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_project_info' or 'get_file', nor does it specify prerequisites or contexts for usage. The only implied usage is for retrieving commit details, but this is basic and lacks explicit alternatives or exclusions.

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