Skip to main content
Glama
abhishekbhakat

mcp-server-code-assist

git_show

Display git commit details including changes and metadata for specific revisions in a repository to review code history and modifications.

Instructions

Shows git commit details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
revisionYes

Implementation Reference

  • Core handler function that executes the git show command using the gitpython library, taking repo_path and revision as inputs.
    async def show(self, repo_path: str, revision: str | None = None, format_str: str | None = None) -> str:
        """Show various types of git objects.
    
        Args:
            repo_path: Path to git repository
            revision: Object to show (commit hash, tag, tree, etc.). Defaults to HEAD
            format_str: Optional format string for pretty-printing (e.g. 'oneline', 'short', 'medium', etc.)
    
        Returns:
            String output of git show command
        """
        repo = git.Repo(repo_path)
        args = []
        if format_str:
            args.extend([f"--format={format_str}"])
        if revision:
            args.append(revision)
        return repo.git.show(*args)
  • Pydantic BaseModel defining the input schema for the git_show tool, with repo_path and revision fields.
    class GitShow(BaseModel):
        repo_path: str
        revision: str
  • MCP tool registration in list_tools(), specifying name, description, and input schema for git_show.
    Tool(
        name=CodeAssistTools.GIT_SHOW,
        description="Shows git commit details",
        inputSchema=GitShow.model_json_schema(),
    ),
  • MCP server call_tool handler case that parses arguments, instantiates the GitShow model, and delegates to GitTools.show().
    case CodeAssistTools.GIT_SHOW:
        model = GitShow(repo_path=arguments["repo_path"], revision=arguments["commit"])
        result = await git_tools.show(model.repo_path, model.revision)
        return [TextContent(type="text", text=result)]
  • Enum definition for the git_show tool name in CodeAssistTools.
    GIT_SHOW = "git_show"
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. 'Shows' implies a read-only operation, but it doesn't specify what 'details' include (e.g., commit message, author, diff), whether it requires git to be initialized, or if there are any error conditions. The description is too vague to inform the agent about how the tool behaves beyond a basic read action.

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 extremely concise with just three words: 'Shows git commit details.' It's front-loaded and wastes no words, making it easy to parse. However, this conciseness comes at the cost of completeness, as noted in other dimensions.

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

Completeness2/5

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

Given the complexity (a git tool with 2 required parameters), no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how to interpret parameters, or any behavioral nuances. For a tool that likely outputs structured commit data, this minimal description leaves significant gaps for the agent to operate effectively.

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

Parameters2/5

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

Schema description coverage is 0%, meaning the input schema provides no descriptions for the two parameters (repo_path and revision). The description 'Shows git commit details' doesn't add any semantic meaning to these parameters—it doesn't explain what repo_path should be (e.g., a file path or URL) or what revision entails (e.g., a commit hash, branch name). The description fails to compensate for the lack of schema documentation.

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

Purpose3/5

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

The description 'Shows git commit details' clearly states the verb ('shows') and resource ('git commit details'), which is better than a tautology. However, it doesn't distinguish this from sibling tools like git_log or git_diff, which also show git-related information. The purpose is understandable but lacks specificity about what makes this tool unique.

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 when git_show is appropriate compared to git_log (which might list commits) or git_diff (which shows changes). There's no context about prerequisites, such as needing a valid git repository or revision. The agent must infer usage from the tool name alone.

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/abhishekbhakat/mcp_server_code_assist'

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