Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
VERBOSENoEnable verbose logging (true/false)
PROJECT_ROOTNoRoot directory of the project (optional, defaults to current directory)
NO_FILE_WATCHERNoDisable file watcher (true/false)
CODE_GRAPH_MCP_LOG_LEVELNoSet logging level (e.g., DEBUG, INFO, WARNING, ERROR)
CODE_GRAPH_MCP_MAX_FILESNoMaximum number of files to track (default 10000)
CODE_GRAPH_MCP_CACHE_SIZENoMaximum cache size in entries (default 300000)
CODE_GRAPH_MCP_FILE_WATCHERNoEnable or disable file watcher (true/false)
CODE_GRAPH_MCP_DEBOUNCE_DELAYNoDebounce delay in seconds before re-analysis (default 2.0)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_usage_guideA

šŸ“š Get comprehensive guidance on effectively using code analysis tools.

šŸŽÆ PURPOSE: Provides detailed instructions, best practices, and workflow recommendations for optimal tool usage. šŸ”§ USAGE: Call this FIRST if you need guidance on tool selection, sequencing, or best practices. ⚔ PERFORMANCE: Lightweight operation - provides strategic guidance without analysis overhead. šŸ”„ WORKFLOW: Use before starting complex analysis tasks to understand optimal tool orchestration.

analyze_codebaseA

šŸ” Perform comprehensive codebase analysis with metrics and structure overview.

šŸŽÆ PURPOSE: Builds the foundational code graph and provides project-wide insights including file counts, language distribution, complexity metrics, and architectural overview. šŸ”§ USAGE: Run this FIRST before using other analysis tools - it builds the code graph that powers all subsequent operations. ⚔ PERFORMANCE: Expensive operation (10-60s for large codebases) - results are cached for subsequent tool calls. Progress is shown during analysis. šŸ”„ WORKFLOW: analyze_codebase → specific analysis tools (find_definition, complexity_analysis, etc.) → insights and recommendations. šŸ’” TIP: Use rebuild_graph=true only if code has changed significantly since last analysis.

find_definitionA

šŸŽÆ Find the definition location of a symbol (function, class, variable, method).

šŸŽÆ PURPOSE: Locates where a symbol is originally defined, providing file path, line number, and context. šŸ”§ USAGE: Use after analyze_codebase when you need to understand where a specific symbol is implemented. ⚔ PERFORMANCE: Fast operation (sub-second) - leverages cached code graph for instant lookups. šŸ”„ WORKFLOW: analyze_codebase → find_definition → examine definition context → find_references/find_callers for usage patterns. šŸ’” TIP: Works with partial names - 'MyClass' will find 'MyClass', 'MyClassImpl', etc. Use exact names for precision.

find_referencesA

šŸ“ Find all references to a symbol throughout the codebase.

šŸŽÆ PURPOSE: Discovers everywhere a symbol is used, imported, or referenced, showing usage patterns and dependencies. šŸ”§ USAGE: Use after find_definition to understand how a symbol is used across the codebase. ⚔ PERFORMANCE: Fast operation (1-3s) - efficiently searches the indexed code graph. šŸ”„ WORKFLOW: find_definition → find_references → analyze usage patterns → complexity_analysis for refactoring insights. šŸ’” TIP: Essential for impact analysis before refactoring - shows all code that would be affected by changes.

find_callersA

šŸ“ž Find all functions that call the specified function.

šŸŽÆ PURPOSE: Identifies the call hierarchy - which functions depend on the target function, essential for understanding code dependencies. šŸ”§ USAGE: Use when analyzing function dependencies, planning refactoring, or understanding code flow patterns. ⚔ PERFORMANCE: Fast operation (1-2s) - uses pre-built call graph for efficient traversal. šŸ”„ WORKFLOW: find_definition → find_callers → analyze call patterns → find_callees for complete dependency picture. šŸ’” TIP: Crucial for refactoring - shows all functions that would break if you change the target function's signature.

find_calleesA

šŸ“± Find all functions called by the specified function.

šŸŽÆ PURPOSE: Maps function dependencies - what other functions does the target function rely on, revealing complexity and coupling. šŸ”§ USAGE: Use to understand function complexity, identify potential extraction opportunities, or analyze dependency chains. ⚔ PERFORMANCE: Fast operation (1-2s) - leverages indexed call relationships for instant results. šŸ”„ WORKFLOW: find_definition → find_callees → complexity_analysis → identify refactoring opportunities. šŸ’” TIP: High callee count often indicates functions that are doing too much and could benefit from decomposition.

complexity_analysisA

šŸ“Š Analyze code complexity and identify refactoring opportunities.

šŸŽÆ PURPOSE: Calculates cyclomatic complexity, identifies code smells, and suggests specific refactoring opportunities with priority rankings. šŸ”§ USAGE: Use after basic analysis to identify problematic code areas that need attention. Essential for code quality assessment. ⚔ PERFORMANCE: Moderate operation (5-15s) - analyzes complexity metrics across the entire codebase. šŸ”„ WORKFLOW: analyze_codebase → complexity_analysis → examine high-complexity functions → find_callers/find_callees for refactoring impact. šŸ’” TIP: Start with threshold=15 for critical issues, lower to 10 for comprehensive analysis. Focus on functions with complexity >20 first.

dependency_analysisA

šŸ”— Analyze module dependencies and import relationships.

šŸŽÆ PURPOSE: Maps module interdependencies, identifies circular dependencies, and reveals architectural patterns and potential issues. šŸ”§ USAGE: Use for architectural analysis, identifying tightly coupled modules, or planning module restructuring. ⚔ PERFORMANCE: Moderate operation (3-10s) - analyzes import relationships and builds dependency graph. šŸ”„ WORKFLOW: analyze_codebase → dependency_analysis → identify problematic dependencies → complexity_analysis for detailed insights. šŸ’” TIP: Look for circular dependencies and modules with high fan-in/fan-out ratios - these often indicate architectural problems.

project_statisticsA

šŸ“ˆ Get comprehensive project statistics and health metrics.

šŸŽÆ PURPOSE: Provides high-level project overview including file counts, language distribution, complexity trends, and overall health score. šŸ”§ USAGE: Use for project assessment, progress tracking, or generating project reports. Great for understanding project scale and characteristics. ⚔ PERFORMANCE: Fast operation (1-3s) - aggregates pre-calculated metrics from the code graph. šŸ”„ WORKFLOW: analyze_codebase → project_statistics → drill down with specific analysis tools based on findings. šŸ’” TIP: Use regularly to track code quality trends over time. Health score below 7/10 indicates areas needing attention.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/eas4ai/code-graph-mcp'

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