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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- code_analysis.py:438-452 (handler)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}"""
- code_analysis.py:438-438 (registration)The @mcp.tool() decorator registers the get_repo_info function as an MCP tool.@mcp.tool()