Skip to main content
Glama
lfnovo

Code Expert MCP Server

by lfnovo

get_source_repo_map

Retrieve a semantic analysis map of a repository's source code, highlighting file hierarchy, functions, classes, and their relationships for comprehensive code understanding.

Instructions

Retrieve a semantic analysis map of the repository's source code structure, including file hierarchy, functions, classes, and their relationships. Repository must be previously cloned via clone_repo.

PARAMETER:

RESPONSE CHARACTERISTICS:

  1. Status Types:

  • "threshold_exceeded": Indicates analysis scope exceeds processing limits

  • "building": Analysis in progress

  • "waiting": Waiting for prerequisite operation

  • "success": Analysis complete

  • "error": Operation failed

  1. Resource Management:

  • Repository size impacts processing time and token usage

  • 'max_tokens' parameter provides approximate control of response size Note: Actual token count may vary slightly above or below specified limit

  • File count threshold exists to prevent overload

  • Processing time scales with both file count and max_tokens Important: Clients should adjust their timeout values proportionally when:

    • Analyzing larger numbers of files

    • Specifying higher max_tokens values

    • Working with complex repositories

  1. Scope Control Options:

  • 'files': Analyze specific files. If only this is provided, the entire repository will be searched for matching file names.

  • 'directories': Analyze all source files within specific directories.

  • If BOTH 'files' and 'directories' are provided, the tool will perform an INTERSECTION, analyzing only the files named in 'files' that are also located within the specified 'directories'.

  1. Response Metadata:

  • Contains processing statistics and limitation details

  • Provides override_guidance when thresholds are exceeded

  • Reports excluded files and completion status

NOTE: This tool supports both broad and focused analysis strategies. Response handling can be adapted based on specific use case requirements and user preferences.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
branchNo
repo_pathYes
max_tokensNo
directoriesNo
cache_strategyNoshared
Behavior5/5

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

With no annotations, the description carries the full burden and delivers rich behavioral details: status types (threshold_exceeded, building, waiting, success, error), resource management implications (token usage, timeout adjustments, file count thresholds), and scope intersection behavior. It also discloses response metadata (override_guidance, excluded files, completion status). No contradictions with annotations exist.

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 sections (PARAMETER, RESPONSE CHARACTERISTICS, Scope Control Options, Response Metadata) and front-loaded with a clear purpose statement. It is somewhat verbose and slightly redundant (e.g., resource management points overlap), but each section adds relevant operational information. It earns its length for a complex tool, though it could be tightened.

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

Completeness4/5

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

Given the tool's complexity (6 parameters, no output schema, no annotations), the description provides extensive context: prerequisite, behavioral statuses, resource trade-offs, scope controls, and metadata. It is missing explicit coverage of the branch and cache_strategy parameters, and the response format beyond status types isn't described. Still, it gives enough for an agent to select and invoke the tool correctly in most scenarios.

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

Parameters4/5

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

The description compensates for the 0% schema coverage by explaining repo_path with examples and normalization, files/directories with intersection logic, and max_tokens with token control nuances. However, it omits documentation for 'branch' and 'cache_strategy' parameters, leaving two of six parameters semantically unexplained. Overall, the semantic coverage is strong but incomplete.

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 it 'Retrieve[s] a semantic analysis map of the repository's source code structure, including file hierarchy, functions, classes, and their relationships.' This is a specific verb and resource, distinct from sibling tools like get_repo_structure or get_repo_documentation. The prerequisite mention ('must be previously cloned via clone_repo') further clarifies the context.

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 by stating that the repository must be cloned first, and details scope control options (files, directories, intersection) with a note supporting 'broad and focused analysis strategies.' It does not explicitly name alternative tools or state when not to use this tool, but the context is sufficient. There is an implicit exclusion: if the repo isn't cloned, you should use clone_repo first.

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