Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_index_healthB

Get index status, statistics, health information, and pipeline progress (indexing, summarization, embedding)

reindexC

Trigger (re)indexing of the project or a subdirectory

embed_repoA

Precompute and cache symbol embeddings for semantic / hybrid search. Embeddings are also computed lazily on first semantic query, but calling this once after a fresh index avoids the first-query latency spike. Requires AI provider to be enabled in config (ollama/openai). Set force=true to drop and recompute all existing embeddings.

register_editA

Notify trace-mcp that a file was edited. Reindexes the single file and invalidates search caches. Call after Edit/Write to keep index fresh. Also checks for duplicate symbols — if _duplication_warnings appears in the response, you may be recreating existing logic; review the referenced symbols before continuing.

get_project_mapA

Get project overview: detected frameworks, languages, file counts, structure. Call with summary_only=true at session start to orient yourself before diving into code.

get_env_varsA

List environment variable keys from .env files with inferred value types/formats. Never exposes actual values — only keys, types (string/number/boolean/empty), and formats (url/email/ip/path/uuid/json/base64/csv/dsn/etc). Use to understand project configuration without accessing secrets.

get_symbolA

Look up a symbol by symbol_id or FQN and return its source code. Use instead of Read when you need one specific function/class/method — returns only the symbol, not the whole file.

searchA

Search symbols by name, kind, or text. Use instead of Grep when looking for functions, classes, methods, or variables in source code. Supports kind/language/file_pattern filters. Set fuzzy=true for typo-tolerant search (trigram + Levenshtein). For natural-language / conceptual queries set semantic="on" (requires an AI provider configured + embed_repo run once). Set fusion=true for Signal Fusion — multi-channel ranking (BM25 + PageRank + embeddings + identity match) via Weighted Reciprocal Rank fusion.

get_outlineA

Get all symbols for a file (signatures only, no bodies). Use instead of Read to understand a file before editing — much cheaper in tokens.

get_change_impactA

Full change impact report: risk score + mitigations, breaking change detection, enriched dependents (complexity, coverage, exports), module groups, affected tests, co-change hidden couplings. Supports diff-aware mode via symbol_ids to scope analysis to only changed symbols.

get_feature_contextA

Search code by keyword/topic → returns ranked source code snippets within a token budget. Use when you need to READ actual code for a concept or feature.

suggest_queriesA

Onboarding helper: shows top imported files, most connected symbols (PageRank), language stats, and example tool calls. Call this first when exploring an unfamiliar project.

get_related_symbolsB

Find symbols related via co-location (same file), shared importers, and name similarity. Useful for discovering related code when exploring a symbol.

get_context_bundleA

Get a symbol's source code + its import dependencies + optional callers, packed within a token budget. Supports batch queries with shared-import deduplication.

get_task_contextA

All-in-one context for starting a dev task: execution paths, tests, entry points, adapted by task type. Use as your FIRST call when beginning any new task.

find_usagesA

Find all places that reference a symbol or file (imports, calls, renders, dispatches). Use instead of Grep for symbol usages — understands semantic relationships, not just text matches.

get_call_graphA

Build a bidirectional call graph centered on a symbol (who calls it + what it calls). Use to understand control flow through a function.

get_tests_forA

Find test files and test functions that cover a given symbol or file. Use instead of Glob/Grep — understands test-to-source mapping, not just filename conventions.

get_implementationsB

Find all classes that implement or extend a given interface or base class

get_api_surfaceB

List all exported symbols (public API) of a file or matching files

get_plugin_registryA

List all registered indexer plugins and the edge types they emit

get_type_hierarchyA

Walk TypeScript class/interface hierarchy: ancestors (what it extends/implements) and descendants (what extends/implements it)

get_dead_exportsB

Find exported symbols never imported by any other file — dead code candidates

get_import_graphA

Show file-level dependency graph: what a file imports and what imports it (requires reindex for ESM edge resolution)

get_untested_exportsC

Find exported public symbols with no matching test file — test coverage gaps

get_untested_symbolsA

Find ALL symbols (not just exports) lacking test coverage. Classifies as "unreached" (no test file imports the source) or "imported_not_called" (test imports file but never references this symbol). Use for thorough coverage gap analysis.

self_auditB

Dead code & coverage audit: dead exports, untested public symbols, heritage debt. Use for cleanup and coverage tasks.

get_couplingC

Coupling analysis: afferent (Ca), efferent (Ce), instability index per file. Shows which modules are stable vs unstable

get_circular_importsA

Find circular dependency chains in the import graph (Kosaraju SCC algorithm)

get_pagerankB

File importance ranking via PageRank on the import graph. Shows most central/important files

get_refactor_candidatesA

Find functions with high complexity called from many files — candidates for extraction to shared modules

get_project_healthB

Structural health: coupling instability, dependency cycles, PageRank rankings, refactor candidates. Use for architecture review.

check_architectureA

Check architectural layer rules: detect forbidden imports between layers (e.g. domain importing infrastructure). Supports auto-detected presets (clean-architecture, hexagonal) or custom layers.

get_code_ownersB

Git-based code ownership: who contributed most to specific files (git shortlog). Requires git.

get_symbol_ownersB

Git blame-based symbol ownership: who wrote which lines of a specific symbol. Requires git.

get_complexity_trendC

File complexity over git history: cyclomatic complexity at past commits. Shows if a file is getting more or less complex.

get_coupling_trendC

File coupling over git history: Ca/Ce/instability at past commits. Shows if a module is stabilizing or destabilizing.

get_symbol_complexity_trendC

Single symbol complexity over git history: cyclomatic, nesting, params, lines at past commits.

check_duplicationA

Check if a function/class name already exists elsewhere in the codebase before creating it. Prevents duplicating existing logic. Call with just a name when planning new code, or symbol_id to check an existing symbol. Returns scored matches — score ≥0.7 means high likelihood of duplication, review the existing symbol before proceeding.

get_git_churnB

Per-file git churn: commits, unique authors, frequency, volatility assessment. Requires git.

get_risk_hotspotsA

Code hotspots: files with both high complexity AND high git churn (Adam Tornhill methodology). Score = complexity × log(1 + commits). Each entry includes a confidence_level (low/medium/multi_signal) counting how many of the two independent signals fired strongly. Result envelope includes _methodology disclosure and _warnings when git is unavailable.

get_dead_codeA

Dead code detection. Two modes: (1) "multi-signal" (default) combines import graph, call graph, and barrel export analysis with confidence scores. (2) "reachability" runs forward BFS from auto-detected entry points (tests, package.json main/bin, src/{cli,main,index}, routes, framework-tagged controllers) — stricter but more accurate when entry points are enumerable. Pass entry_points to add custom roots. Both modes emit _methodology and _warnings.

scan_securityA

Scan project files for OWASP Top-10 security vulnerabilities using pattern matching. Detects SQL injection (CWE-89), XSS (CWE-79), command injection (CWE-78), path traversal (CWE-22), hardcoded secrets (CWE-798), insecure crypto (CWE-327), open redirects (CWE-601), and SSRF (CWE-918). Skips test files.

detect_antipatternsA

Detect performance antipatterns: N+1 query risks, missing eager loading, unbounded queries, event listener leaks, circular model dependencies, missing indexes, memory leaks (unbounded caches, closure leaks). Static analysis across all indexed ORMs (Eloquent, Sequelize, Mongoose, Django, Prisma, TypeORM, Drizzle).

scan_code_smellsA

Find deferred work and shortcuts: TODO/FIXME/HACK/XXX comments, empty functions & stubs, hardcoded values (IPs, URLs, credentials, magic numbers, feature flags). Surfaces technical debt that grep alone misses by combining comment scanning, symbol body analysis, and context-aware false-positive filtering.

taint_analysisA

Track flow of untrusted data from sources (HTTP params, env vars, file reads) to dangerous sinks (SQL queries, exec, innerHTML, redirects). Framework-aware: knows Express req.params, Laravel $request->input, Django request.GET, FastAPI Query(), etc. Reports unsanitized flows with CWE IDs and fix suggestions. More accurate than pattern-based scanning — traces actual data flow paths.

generate_sbomA

Generate a Software Bill of Materials (SBOM) from package manifests and lockfiles. Supports npm, Composer, pip, Go, Cargo, Bundler, Maven. Outputs CycloneDX, SPDX, or plain JSON. Includes license compliance warnings for copyleft licenses.

get_artifactsA

Surface non-code knowledge from the index: DB schemas (migrations, ORM models), API specs (routes, OpenAPI endpoints), infrastructure (docker-compose services, K8s resources), CI pipelines (jobs, stages), and config (env vars). All data from the existing index — no extra I/O.

plan_batch_changeA

Analyze the impact of updating a package/dependency. Shows all affected files, import references, and generates a PR template with checklist. Use before upgrading a dependency to understand blast radius.

get_complexity_reportA

Get complexity metrics (cyclomatic, max nesting, param count) for symbols in a file or across the project. Useful for identifying complex code before refactoring.

check_renameA

Pre-rename collision detection: checks the symbol's own file and all importing files for existing symbols with the target name

apply_renameA

Rename a symbol across all usages (definition + all importing files). Runs collision detection first and aborts on conflicts. Returns the list of edits applied.

remove_dead_codeA

Safely remove a dead symbol from its file. Verifies the symbol is actually dead (multi-signal detection or zero incoming edges) before removal. Warns about orphaned imports in other files.

extract_functionB

Extract a range of lines into a new named function. Detects parameters (variables from outer scope) and return values (variables used after the range). Supports TypeScript/JavaScript, Python, and Go.

apply_codemodA

Bulk regex find-and-replace across files. Dry-run by default — first call shows preview, second call with dry_run=false applies. Use for mechanical changes like adding async/await, renaming patterns, updating imports across many files.

apply_moveA

Move a symbol to a different file or rename/move a file, updating all import paths across the codebase. Dry-run by default (safe preview).

change_signatureA

Change a function/method signature (add/remove/rename/reorder parameters) and update all call sites. Dry-run by default (safe preview).

plan_refactoringA

Preview any refactoring (rename, move, extract, signature) without applying. Returns all edits as {old_text, new_text} pairs. Use to review changes before applying the real tool.

get_service_mapB

Get map of all services, their APIs, and inter-service dependencies. Auto-detects services from Docker Compose or treats each repo as a service.

get_cross_service_impactC

Analyze cross-service impact of changing an endpoint or event. Shows which services would be affected.

get_api_contractB

Get API contract (OpenAPI/gRPC/GraphQL) for a service. Parses spec files found in the service repo.

get_service_depsA

Get external service dependencies: which services this one calls (outgoing) and which call it (incoming).

get_contract_driftB

Detect mismatches between API spec and implementation: endpoints in spec but not in code, or in code but not in spec.

get_subproject_graphA

Show all subprojects and their cross-repo connections. A subproject is any working repository in your project ecosystem (microservices, frontends, backends, shared libraries, CLI tools, etc.). Displays repos, endpoints, client calls, and inter-repo dependency edges.

get_subproject_impactB

Cross-repo impact analysis: find all client code across subprojects that would break if an endpoint changes. Resolves down to symbol level when per-repo indexes exist.

subproject_add_repoA

Add a repository as a subproject of the current project. A subproject is any working repository in your ecosystem: microservices, frontends, backends, shared libraries, CLI tools. Discovers services, parses API contracts (OpenAPI/gRPC/GraphQL), scans for HTTP client calls, and links them to known endpoints.

subproject_syncB

Re-scan all subprojects: re-discover services, re-parse contracts, re-scan client calls, and re-link everything.

get_subproject_clientsB

Find all client calls across subprojects that call a specific endpoint. Shows file, line, call type, and confidence.

get_contract_versionsA

Show version history for a service API contract with breaking change detection between versions. Compares request/response schemas across snapshots to flag removed fields, type changes, and renames.

discover_claude_sessionsA

Scan ~/.claude/projects for projects Claude Code has touched on this machine, decode each directory name back to its absolute path, and report which ones still exist plus session-file count and last activity. With add_as_subprojects=true, every existing project is registered as a subproject in one call — useful for spinning up multi-repo intelligence after a fresh clone.

visualize_subproject_topologyB

Open interactive HTML visualization of the subproject topology: services as nodes, API calls as edges, health/risk indicators per service. Node size = endpoint count, color = health (green/yellow/red).

query_by_intentA

Map a business question to domain taxonomy → returns domain ownership and relevance scores (no source code). Use when you need to know WHICH DOMAIN owns specific functionality.

get_domain_mapA

Get hierarchical map of business domains with key symbols per domain. Auto-builds domain taxonomy on first call using heuristic classification.

get_domain_contextC

Get all code related to a specific business domain. Supports "parent/child" notation (e.g. "payments/refunds").

get_cross_domain_depsC

Show which business domains depend on which. Based on edges between symbols in different domains.

graph_queryA

Trace how named symbols relate in the dependency graph → returns subgraph + Mermaid diagram. Input must contain symbol/class names (e.g. "How does AuthService reach Database?", "What depends on UserModel?").

get_dataflowB

Intra-function dataflow analysis: track how each parameter flows through the function body — into which calls, where it gets mutated, and what is returned. Phase 1: single function scope.

visualize_graphA

Open interactive HTML graph in browser showing file/symbol dependencies. Supports force/hierarchical/radial layouts, community coloring. Use granularity=symbol to see individual functions/classes/methods as nodes instead of files.

get_dependency_diagramA

Render dependency diagram for a file/directory path as Mermaid or DOT. Input: a path like "src/tools/" — not a question. Trims to max_nodes most important nodes.

search_textA

Full-text search across all indexed files. Supports regex, glob file patterns, language filter. Use for finding strings, comments, TODOs, config values, error messages — anything not captured as a symbol.

predict_bugsA

Predict which files are most likely to contain bugs. Multi-signal scoring: git churn, fix-commit ratio, complexity, coupling, PageRank importance, author count. Each prediction includes a numeric score, risk bucket (low/medium/high/critical) AND a confidence_level (low/medium/high/multi_signal) counting how many independent signals actually fired. Result envelope includes _methodology disclosure. Cached for 1 hour; use refresh=true to recompute.

detect_driftA

Detect architectural drift: cross-module co-change anomalies (files in different modules that always change together) and shotgun surgery patterns (commits touching 3+ modules). Requires git.

get_tech_debtA

Per-module tech debt score (A–F grade) combining: complexity, coupling instability, test coverage gaps, and git churn. Includes actionable recommendations.

assess_change_riskA

Before modifying a file or symbol, predict risk level (low/medium/high/critical) with contributing factors and recommended mitigations. Combines blast radius, complexity, git churn, test coverage, and coupling.

get_health_trendsB

Time-series health metrics for a file or module: bug score, complexity, coupling, churn over time. Populated by predict_bugs runs.

get_workspace_mapA

List all detected monorepo workspaces with file counts, symbol counts, and languages. Returns dependency graph between workspaces showing cross-workspace imports.

get_cross_workspace_impactA

Show which workspaces are affected by changes in a given workspace. Lists all cross-workspace edges, affected symbols, and the public API surface consumed by other workspaces.

get_co_changesC

Find files that frequently change together in git history (temporal coupling).

refresh_co_changesC

Rebuild co-change index from git history.

get_changed_symbolsA

Map a git diff to affected symbols (functions, classes, methods). For PR review. If "since" is omitted, auto-detects main/master as the base.

compare_branchesA

Compare two branches at symbol level: what was added, modified, removed. Resolves merge-base automatically, groups by category/file/risk, includes blast radius and risk assessment.

detect_communitiesB

Run Leiden community detection on the file dependency graph. Identifies tightly-coupled file clusters (modules).

get_communitiesA

Get previously detected communities (file clusters). Run detect_communities first.

get_communityB

Get details for a specific community: files, inter-community dependencies.

audit_configB

Scan AI agent config files for stale references, dead paths, and token bloat.

get_control_flowA

Build a Control Flow Graph (CFG) for a function/method: if/else branches, loops, try/catch, returns, throws. Shows logical paths through the code. Outputs Mermaid diagram, ASCII, or JSON.

get_package_depsA

Cross-repo package dependency analysis: find which registered projects depend on a package, or what packages a project publishes. Scans package.json/composer.json/pyproject.toml across all repos in the registry.

generate_docsC

Auto-generate project documentation from the code graph. Produces structured docs with architecture, API surface, data models, components, and dependency analysis.

pack_contextA

Pack project context into a single document for external LLMs. Intelligent selection by graph importance, fits within token budget. Better than Repomix for focused context. Strategies: most_relevant (default — feature/PageRank ranked), core_first (PageRank always wins, surfaces architecturally central code), compact (signatures only — drops source bodies, lets outlines cover much more of the repo per token).

check_quality_gatesA

Run configurable quality gate checks against the project. Returns pass/fail for each gate (complexity, coupling, circular imports, dead exports, tech debt, security, antipatterns, code smells). Designed for CI integration — AI can verify gates pass before committing.

Prompts

Interactive templates invoked by user choice

NameDescription
reviewComprehensive PR review: changed files impact, blast radius, test gaps, architecture check
onboardNew developer orientation: project map, architecture, key modules, entry points
debugDebug workflow: trace execution path, find related code, identify failure points
architectureArchitecture health check: coupling, cycles, tech debt, hotspots, prediction
pre-mergePre-merge safety checklist: blast radius, dead code, rename safety, test gaps

Resources

Contextual data attached and managed by the client

NameDescription
project-mapProject map (frameworks, stats, structure)
project-healthIndex health status

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/nikolai-vysotskyi/trace-mcp'

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