Skip to main content
Glama
Jamie-BitFlight

git-project-xray-mcp

explore_repo

Progressively map codebase structure: start with directories, then zoom into folders with function and class symbols. Cached per git commit for instant subsequent calls.

Instructions

πŸ—ΊοΈ STEP 1: Map the codebase structure - start simple, then zoom in!

PROGRESSIVE DISCOVERY WORKFLOW:

  1. First call: explore_repo("/path/to/project") - See directory structure only

  2. Zoom in: explore_repo("/path/to/project", focus_dirs=["src"], include_symbols=True)

  3. Go deeper: explore_repo("/path/to/project", max_depth=3, include_symbols=True)

INPUTS:

  • root_path: The ABSOLUTE path to the project (e.g., "/Users/john/myproject") NOT relative paths like "./myproject" or "~/myproject"

  • max_depth: How deep to traverse directories (None = unlimited, accepts int or string)

  • include_symbols: Show function/class signatures with docs (False = dirs only, accepts bool or string)

  • focus_dirs: List of top-level directories to focus on (e.g., ["src", "lib"])

  • max_symbols_per_file: Max symbols to show per file when include_symbols=True (accepts int or string)

EXAMPLE 1 - Initial exploration (directory only): explore_repo("/Users/john/project")

Returns:

/Users/john/project/

β”œβ”€β”€ src/

β”œβ”€β”€ tests/

β”œβ”€β”€ docs/

└── README.md

EXAMPLE 2 - Zoom into src/ with symbols: explore_repo("/Users/john/project", focus_dirs=["src"], include_symbols=True)

Returns:

/Users/john/project/

└── src/

β”œβ”€β”€ auth.py

β”‚ β”œβ”€β”€ class AuthService: # Handles user authentication

β”‚ β”œβ”€β”€ def authenticate(username, password): # Validates credentials

β”‚ └── def logout(session_id): # Ends user session

└── models.py

β”œβ”€β”€ class User(BaseModel): # User account model

└── ... and 3 more

EXAMPLE 3 - Limited depth exploration: explore_repo("/Users/john/project", max_depth=1, include_symbols=True)

Shows only top-level dirs and files with their symbols

πŸ’‘ PRO TIP: Start with include_symbols=False to see structure, then set it to True for areas you want to examine in detail. This prevents information overload!

⚑ PERFORMANCE: Symbol extraction is cached per git commit - subsequent calls are instant!

WHAT TO DO NEXT:

  • If you found interesting directories, zoom in with focus_dirs

  • If you see relevant files, use find_symbol() to locate specific functions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
root_pathYes
max_depthNo
include_symbolsNo
focus_dirsNo
max_symbols_per_fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavior: shows directory structure and optionally symbols, performance caching per git commit, accepts flexible types (int or string for several params), and provides detailed examples of output format. No destructive actions are implied, and it clarifies expected inputs like absolute root_path.

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 long but well-organized with emojis, numbered workflow, examples, and pro tips. Every section adds value; however, some redundancy (e.g., repeated parameter types) could be trimmed. It is front-loaded with the main purpose and workflow, making it easy to grasp quickly.

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

Completeness5/5

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

Given 5 parameters, no annotations, and an output schema, the description covers all necessary input details and workflow guidance. The examples effectively illustrate expected output, and the output schema likely provides additional structure. The description addresses the complexity of progressive exploration thoroughly.

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

Parameters5/5

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

Schema coverage is 0%, but the description richly explains each parameter: root_path (absolute path requirement), max_depth (how deep, unlimited by default, accepts int/string), include_symbols (shows signatures, accepts bool/string), focus_dirs (top-level directories), and max_symbols_per_file (limit when symbols included). Examples demonstrate usage.

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 maps a codebase structure starting simple then zooming in. It specifies 'explore_repo' as distinct from sibling tools 'find_symbol' and 'what_breaks' by focusing on directory and symbol overview rather than locating specific functions or analyzing breaks.

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

Usage Guidelines5/5

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

The description provides a clear progressive discovery workflow (step 1-3), explicit when to use include_symbols, and advice on avoiding information overload. It also tells what to do next after exploring, giving contextual guidance on using focus_dirs or find_symbol.

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/Jamie-BitFlight/git-project-xray-mcp'

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