Skip to main content
Glama
lfnovo

Code Expert MCP Server

by lfnovo

get_repo_structure

Retrieve a repository's directory structure and analyzable file counts to identify main code locations, guiding targeted analysis decisions.

Instructions

Retrieve directory structure and analyzable file counts for a repository to guide analysis decisions.

PARAMETER:

RESPONSE CHARACTERISTICS:

  1. Directory Information:

  • Lists directories containing analyzable source code

  • Reports number of analyzable files per directory

  • Shows directory hierarchy

  • Indicates file extensions present in each location

  1. Usage:

  • Requires repository to be previously cloned via clone_repo

  • Helps identify main code directories

  • Supports planning targeted analysis

  • Shows where analyzable code is located

NOTE: Use this tool to understand repository structure and choose which directories to analyze in detail.

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?

Without annotations, the description carries the full burden. It discloses that the repository must be cloned first, that repo_path formats are normalized automatically, and describes response characteristics (directory hierarchy, file counts, extensions). It does not mention side effects (likely none) or how optional parameters affect output, but it provides meaningful behavioral context beyond the tool's basic function.

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?

The description is well-structured with clear sections (parameter, response characteristics, usage, note). It is a bit verbose and repeats the usage intent in multiple bullets, but overall it is organized and each section adds value without requiring extensive trimming.

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 the tool has 5 parameters and no output schema, the description should cover all parameters and return behavior. It explains repo_path and gives a high-level summary of response characteristics, but omits the other four parameters. This makes it incomplete for a tool of this complexity, though it does provide enough context for the main use case.

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

Parameters2/5

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

Schema coverage is 0%, so the description must compensate. It only documents repo_path with examples and normalization behavior, which is helpful for the required parameter. However, it completely ignores the other four parameters (branch, directories, include_files, cache_strategy), leaving their meaning and effect undocumented. This is a significant gap given the number of parameters.

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 tool retrieves directory structure and analyzable file counts for a repository, which is a specific verb and resource. It distinguishes itself from sibling tools like get_repo_file_content or get_repo_critical_files by focusing on structure and file counts rather than content or critical files.

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

Usage Guidelines4/5

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

The description provides clear usage context: it is for understanding repository structure and deciding which directories to analyze in detail. It also states a prerequisite (requires prior cloning via clone_repo). However, it does not explicitly exclude other tools or mention when not to use it, so it falls short of a 5.

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/lfnovo/code-expert-mcp'

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