Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CBM_WORKERSNoOverride the parallel-indexing worker count. Range 1-256.
CBM_CACHE_DIRNoOverride the database storage directory. All project indexes and config are stored here.~/.cache/codebase-memory-mcp
CBM_LOG_LEVELNoSet the minimum log level. Accepted values: debug, info, warn, error, none or 0-4.info
CBM_DIAGNOSTICSNoSet to '1' or 'true' to enable periodic diagnostics output to /tmp/cbm-diagnostics-<pid>.json.false
CBM_DOWNLOAD_URLNoOverride the download URL for updates. Used for testing or self-hosted deployments.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
index_repositoryA

Index a repository into the knowledge graph. Special mode 'cross-repo-intelligence': skip extraction, only match Routes/Channels across projects to create CROSS_HTTP_CALLS/CROSS_ASYNC_CALLS/CROSS_CHANNEL edges. Requires target_projects param. Ensure target projects have fresh indexes first. COVERAGE: the response reports files that were NOT fully indexed — 'skipped' (not indexed at all: oversized/read/parse failures) and 'parse_partial' (indexed, but constructs inside the listed line ranges could not be parsed and MAY be missing from the graph). The embedded lists carry counts plus a FEW EXAMPLES only; the complete lists are in the per-run 'logfile' (path in the response) and queryable any time via index_status or structurally via query_graph(graph="missed"). Both signals are best-effort: absence of a flag is NOT a completeness guarantee; prefer grep inside flagged ranges. Separately, 'excluded' + 'not_indexed_files' list what was deliberately NOT indexed (gitignore/.cbmignore/skip-lists) — by design, not failures.

search_graphA

Search the code knowledge graph for functions, classes, routes, and variables. Use INSTEAD OF grep/glob when finding code definitions, implementations, or relationships. Three search modes: (1) query='update settings' for BM25 ranked full-text search with camelCase splitting and structural label boosting — recommended for natural-language discovery; (2) name_pattern='.regex.' for exact pattern matching; (3) semantic_query=[...] for vector cosine search that bridges vocabulary (finds 'publish' when you search 'send'). The three modes are independent and can be combined in a single call. RESPONSE: prefix-grouped tree rows by default — a shared (qn-prefix, file) group header printed once, then name label lines in out per row (full qn = group prefix + dot + name). in/out = selected degree across CALLS, USAGE, CALL_REFERENCE, INHERITS, and IMPLEMENTS; other edge types are excluded. These are NOT caller/callee counts — use trace_path for callers. Add per-node property columns via fields (e.g. ["complexity","signature","docstring"]); format="json" returns the SAME tree model as structured JSON. PAGINATION: results are capped at limit (default 50). The response always includes 'total' (full match count before limit) and 'has_more' (true when total > offset+returned). Detect truncation with has_more, then page by re-calling with offset=offset+limit until has_more is false. Narrow first via label/file_pattern/min_degree before paginating large result sets.

query_graphA

Execute a Cypher query against the knowledge graph for complex multi-hop patterns, aggregations, and cross-service analysis. The response includes 'total' (returned row count). There is a hard 100k row ceiling — for broad queries add LIMIT in the Cypher itself or use search_graph + offset/limit pagination instead. COMPLEXITY / BOTTLENECKS: every Function and Method node carries queryable complexity properties — cyclomatic (complexity), cognitive, loop_count, loop_depth (max nested-loop depth, a polynomial-degree proxy), plus interprocedural transitive_loop_depth (worst-case nested-loop degree propagated along CALLS edges) and a recursive flag. Additional hot-path signals: linear_scan_in_loop (count of find/contains/indexOf-style scans inside a loop — the hidden O(n^2) that loop_depth misses), alloc_in_loop (allocations/appends inside a loop), recursion_in_loop (a self-call inside a loop), unguarded_recursion (recursion with no conditionally-guarded base case), param_count and max_access_depth (structure smells). Find all hot-path candidates in one query, e.g. MATCH (f:Function) WHERE f.transitive_loop_depth >= 3 OR f.linear_scan_in_loop >= 1 RETURN f.qualified_name, f.transitive_loop_depth, f.linear_scan_in_loop ORDER BY f.transitive_loop_depth DESC. MISSED GRAPH: pass graph="missed" to query the best-effort miss graph instead — the file structure of ONLY the files the indexer could NOT fully index (Project → Folder → File nodes with CONTAINS_FOLDER/CONTAINS_FILE edges; each File carries kind ("parse_partial" = indexed but constructs in the flagged line ranges MAY be missing; or a skip phase) and detail (the line ranges / reason)). Example: MATCH (f:File) WHERE f.kind = "parse_partial" RETURN f.file_path, f.detail. Absence from this graph is NOT a completeness guarantee.

trace_pathA

Trace paths through the code graph. Modes: calls (callers/callees), data_flow (value propagation with args at each hop), cross_service (through HTTP/async Route nodes). Use INSTEAD OF grep for callers, dependencies, impact analysis, or data flow tracing. RESPONSE: prefix-grouped tree rows — callees/callers grouped under their shared qn-prefix, name hop per row (full qn = group prefix + dot + name); exact callees_total/callers_total on every page = ALL nodes reachable within depth (transitive, not just direct; test files excluded unless include_tests). risk/args flags use a flat table. truncated: true + next = more rows — pass next back as cursor. format="json" returns the SAME tree model as structured JSON.

get_code_snippetA

Read source code for a function/class/symbol. IMPORTANT: First call search_graph to find the exact qualified_name, then pass it here. This is a read tool, not a search tool. Accepts full qualified_name (exact match) or short function name (returns suggestions if ambiguous). If the response carries a 'coverage_note', the file was only partially indexed — constructs in the noted line ranges may be missing from the graph (best-effort signal); prefer grep there and treat the returned source as ground truth.

get_graph_schemaC

Get the schema of the knowledge graph (node labels, edge types)

get_architectureA

Get high-level architecture overview. DEFAULT (no aspects) is a compact summary — overview counts, languages, packages, entry_points; request more via aspects:[...] (structure, dependencies, routes, hotspots, boundaries, layers, clusters, file_tree) or ["all"]. 'clusters' runs Leiden community detection over the call/import graph, surfacing the de-facto modules (label, member count, cohesion score, representative top_nodes, binding packages/edge_types) — the real architectural seams, which often cut across the folder layout. Optional path scopes analysis to nodes under that directory prefix (file_path).

search_codeA

Graph-augmented code search. Finds text patterns via grep, then enriches results with the knowledge graph: deduplicates matches into containing functions, ranks by structural importance (definitions first, popular functions next, tests last). Modes: compact (default, signatures only — token efficient), full (source capped at a 60-line window around the first match per hit; source_truncated marks the cut — use get_code_snippet for the complete symbol), files (just file paths). Use path_filter regex to scope results. TRUNCATION: enriched results are capped at limit (default 10). Response carries 'total_grep_matches' (raw grep hit count) and 'total_results' (deduplicated function count) — compare to limit to detect truncation. There is no offset parameter; to see more, raise limit or narrow the query with file_pattern / path_filter.

list_projectsA

List all indexed projects

delete_projectC

Delete a project from the index

index_statusA

Get the indexing status of a project: node/edge counts, root path, git context, and the indexing-COVERAGE report — which files the indexer could NOT fully cover (best-effort signal): 'parse_partial' files WERE indexed but contain line ranges tree-sitter could not parse — constructs there MAY be missing from the graph (some are still recovered); 'skipped' files were not indexed at all (oversized/read/parse failure). Use this before trusting graph completeness on a file: if a file is listed, ALSO grep it (especially the flagged ranges). IMPORTANT: absence from these lists is NOT a completeness guarantee — the signal only marks what the indexer can detect. For structural queries over the misses use query_graph(graph="missed"). The report also carries 'not_indexed' — files/dirs excluded BY DESIGN (gitignore/.cbmignore/skip-lists): deliberate and deterministic, not failures; change the ignore rules and re-index to include them.

check_index_coverageA

Check authoritative indexing-coverage metadata for exact repository-relative paths and bounded path scopes. Use this after graph discovery for every cited or operated-on file; use scopes before negative/exhaustive claims because fully skipped files cannot appear in normal graph results. Returns coverage status separately from filesystem metadata freshness, plus structured parse-error ranges and direct-source fallback actions. The signal is best-effort: indexed_no_recorded_gap is not a completeness guarantee. At least one of 'paths' or 'scopes' is required; the call is rejected at runtime if both are omitted.

detect_changesA

Map a git diff to its BLAST RADIUS. Resolves changed files to the symbols they define, then runs ONE multi-source graph traversal to the transitive impact set. RESPONSE: base + merge_base SHA, changed_files list, then impacted = prefix-grouped tree rows (name label hop; full qn = group prefix + dot + name) + an impacted_modules rollup; impacted_total + truncated are exact. Seeds (the changed symbols) are excluded from impacted; a changed file reached from another changed file is not counted as extra impact. format="json" returns the same model as structured JSON.

manage_adrC

Create or update Architecture Decision Records

ingest_tracesC

Ingest runtime traces to enhance the knowledge graph

Prompts

Interactive templates invoked by user choice

NameDescription
explore_codebaseExplore a codebase with graph-first structural discovery.
review_change_impactReview affected callers, tests, boundaries, and risks.

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/DeusData/codebase-memory-mcp'

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