Skip to main content
Glama
saiprashanths

Code Analysis MCP Server

get_repo_info

Retrieve details about the current code repository, including structure and metadata, to analyze codebases and understand system architecture.

Instructions

Get information about the currently initialized code repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_repo_info' tool. It checks if a repository is initialized and returns basic information about it, including path, existence, directory status, and .gitignore presence. Registered via the @mcp.tool() decorator.
    @mcp.tool()
    async def get_repo_info() -> str:
        """Get information about the currently initialized code repository."""
        if not mcp.repo_path:
            return "No code repository has been initialized yet. Please use initialize_repository first."
        
        gitignore_path = mcp.repo_path / '.gitignore'
        gitignore_status = "Found .gitignore file" if gitignore_path.exists() else "No .gitignore file present"
        
        return f"""Code Repository Information:
    Path: {mcp.repo_path}
    Exists: {mcp.repo_path.exists()}
    Is Directory: {mcp.repo_path.is_dir()}
    {gitignore_status}"""
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 gets information, implying a read-only operation, but doesn't specify what type of information (e.g., metadata, status, details) or any behavioral traits like error handling, permissions needed, or response format. This leaves significant gaps for a 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.

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured.

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 tool's complexity (simple read operation) but lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned, potential errors, or how it differs from siblings, leaving the agent with insufficient context to use it effectively beyond basic purpose.

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?

The tool has 0 parameters, and the schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't mention parameters, aligning with the schema. A baseline of 4 is applied as it handles the zero-parameter case correctly without redundancy.

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 ('Get information') and resource ('currently initialized code repository'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_repo_structure' or 'initialize_repository', 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 minimal guidance by implying usage when a repository is 'currently initialized,' but it doesn't specify when to use this tool versus alternatives like 'get_repo_structure' or 'initialize_repository.' No explicit when-not-to-use or prerequisite information is included.

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/saiprashanths/code-analysis-mcp'

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