Skip to main content
Glama
saiprashanths

Code Analysis MCP Server

get_repo_info

Retrieve detailed information about the currently initialized code repository to understand its structure, data models, and system architecture for streamlined code analysis.

Instructions

Get information about the currently initialized code repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the get_repo_info tool. It checks if a repository is initialized and returns details about the repo path, existence, directory status, and .gitignore presence.
    @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}"""
  • The @mcp.tool() decorator registers the get_repo_info function as an MCP tool.
    @mcp.tool()

Other Tools

Related 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