Skip to main content
Glama
codingthefuturewithai

Code Understanding MCP Server

get_repo_structure

Retrieves repository directory structure and file listings with extension counts, enabling code analysis and navigation.

Instructions

    Get repository structure information with optional file listings.

    Args:
        repo_path: Path/URL matching what was provided to clone_repo
        directories: Optional list of directories to limit results to
        include_files: Whether to include list of files in response

    Returns:
        dict: {
            "status": str,
            "message": str,
            "directories": [{
                "path": str,
                "analyzable_files": int,
                "extensions": {
                    "py": 10,
                    "java": 5,
                    "ts": 3
                },
                "files": [str]  # Only present if include_files=True
            }],
            "total_analyzable_files": int
        }
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNo
repo_pathYes
directoriesNo
include_filesNo
cache_strategyNoshared
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the return structure (dict with status, message, directories, total_analyzable_files) and behavior of including files. However, it does not mention error handling, caching strategy, or what happens if repo_path is invalid, which are minor gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Description is well-structured with Args and Returns sections, concise without being overly terse. Each sentence adds value, though the Return block could be slightly shortened. Overall efficient.

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

Completeness3/5

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

Given 5 parameters, no output schema, and no annotations, the description provides a good base but lacks details on error handling, caching, and the branch parameter. The return structure helps, but completeness is limited by omitted parameters.

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

Parameters3/5

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

Schema description coverage is 0%, so description must compensate. It explains repo_path, directories, and include_files well, but omits description for branch and cache_strategy (2 of 5 parameters). This partial coverage leaves ambiguity.

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

Purpose5/5

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

The description clearly states the verb 'Get' and the resource 'repository structure information', and distinguishes it from siblings that focus on different aspects like cloning or file content. The addition of 'with optional file listings' adds specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used after clone_repo by mentioning 'Path/URL matching what was provided to clone_repo', but does not explicitly state when to use it versus siblings like get_repo_file_content or get_repo_critical_files. No exclusions or alternatives are given.

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/codingthefuturewithai/mcp-code-understanding'

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