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}"""

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