38 tools from the Codegraph MCP Server, categorised by risk level.
View the Codegraph policy →codegraph_analyze_complexity Measures code complexity metrics for refactoring decisions. USE WHEN: identifying functions that need simplification, reviewing code quality, or pr... codegraph_analyze_coupling Measures module coupling for architectural analysis. USE WHEN: evaluating module boundaries, planning decoupling refactoring, or assessing architec... codegraph_analyze_impact Predicts blast radius of code changes before making them. USE WHEN: planning refactoring, renaming symbols, deleting code, or assessing risk. Retur... codegraph_cluster_symbols Groups functions into semantic clusters based on what they do (e.g., all database access functions, all error handlers, all auth checks). USE WHEN:... codegraph_compare_symbols Compares two functions semantically and structurally. USE WHEN: reviewing duplicates from find_duplicates, deciding whether to merge similar code, ... codegraph_cross_project_search Search for symbols across ALL other indexed projects in the shared graph database. USE WHEN: finding cross-repo dependencies, discovering API consu... 2/5 codegraph_find_by_imports Finds all files importing a specific module or package. USE WHEN: planning library migrations, finding all React component usages, or discovering i... codegraph_find_by_signature Finds functions matching signature patterns. USE WHEN: searching by structural characteristics rather than names - parameter count, return types, o... codegraph_find_duplicates Detects duplicate and near-duplicate functions across the codebase using semantic code embeddings. USE WHEN: cleaning up code, finding copy-paste p... codegraph_find_entry_points Discovers application entry points and execution starting points. USE WHEN: understanding app architecture, tracing request flow, or finding where ... codegraph_find_implementors Find all functions registered as implementations of an ops struct field (e.g., who implements ndo_open in net_device_ops). USE WHEN: exploring driv... codegraph_find_related_tests Discovers test files and functions that exercise specific code. USE WHEN: modifying code to know which tests to run/update, debugging to find test ... codegraph_find_similar Finds functions most similar to a given function using semantic code embeddings. USE WHEN: checking if similar functionality already exists before ... codegraph_find_unused_code Detects dead code that can be safely removed. USE WHEN: cleaning up codebase, reducing bundle size, or finding abandoned features. Returns unused_i... codegraph_get_ai_context Gathers comprehensive code context optimized for AI understanding. USE WHEN: explaining code, planning modifications, debugging issues, or writing ... codegraph_get_call_graph Maps function call relationships showing callers and callees. USE WHEN: tracing execution flow, understanding function usage, finding dead code, or... codegraph_get_callees Finds all functions called by a target function (forward call graph). USE WHEN: understanding function dependencies, tracing execution flow, or ana... codegraph_get_callers Finds all functions that call a target function (reverse call graph). USE WHEN: understanding function usage, finding all invocation sites, or asse... codegraph_get_curated_context Discovers and assembles context across the entire codebase for a natural language query. USE WHEN: you need to understand a concept, pattern, or su... 3/5 codegraph_get_dependency_graph Analyzes file import/dependency relationships. USE WHEN: understanding module architecture, finding circular dependencies, planning refactoring, or... codegraph_get_detailed_symbol Gets comprehensive symbol details including source code and relationships. USE WHEN: you need full context about a symbol — source code, callers, c... codegraph_get_edit_context Assembles everything needed to edit code at a specific location in a single call. USE WHEN: you are about to modify, refactor, or fix code and need... codegraph_get_symbol_info Gets quick metadata about any symbol (function, class, variable, type). USE WHEN: you need to quickly understand what a symbol is, check its signat... codegraph_memory_context Finds memories relevant to current code location. USE WHEN: starting work on a file/function to see past context. THIS SHOULD BE YOUR FIRST CALL wh... codegraph_memory_get Retrieves full memory details by ID. USE WHEN: you have a memory ID from search results and need complete content. codegraph_memory_invalidate Marks memory as outdated without deleting. USE WHEN: knowledge is superseded, bugs are fixed, decisions are reversed. Maintains history while preve... codegraph_memory_list Lists memories with filtering and pagination. USE WHEN: browsing available memories or auditing stored knowledge. codegraph_memory_search Searches memories with hybrid BM25 + semantic + graph proximity. USE WHEN: recalling past knowledge — previous debugging sessions, architectural de... 2/5 codegraph_memory_stats Get statistics about stored memories - counts by kind, total storage, etc. codegraph_memory_store Persists knowledge for future sessions. USE WHEN: discovering important context worth remembering — debugging insights, architectural decisions, kn... codegraph_reindex_workspace Reindex the workspace to refresh the code graph. USE WHEN: the graph data is stale or parsers have been updated. This clears the existing graph and... 2/5 codegraph_search_git_history Searches git commit history using both semantic matching and keyword search. USE WHEN: you need to understand what changed and why — e.g., 'what ch... 2/5 codegraph_symbol_search Searches codebase for symbols by name or pattern. USE WHEN: finding function/class implementations, exploring unfamiliar code, or locating specific... 2/5 codegraph_index_files Add or update specific files in the code graph without full reindex. USE WHEN: new files were created, existing files were modified, or you need sp... 2/5 codegraph_mine_git_history Mines git history to create memories from commit messages and patterns. USE WHEN: setting up a new project to bootstrap knowledge from past commits. 2/5 codegraph_mine_git_history_for_file Mines git history for a specific file to create memories. USE WHEN: wanting to understand the history and evolution of a particular file. Requires ... 2/5 The Codegraph MCP server exposes 38 tools across 4 categories: Read, Write, Destructive, Execute.
Use Intercept, the open-source MCP proxy. Write YAML rules for each tool — rate limits, argument validation, or deny rules — then run Intercept in front of the Codegraph server.
Codegraph tools are categorised as Read (33), Write (3), Destructive (1), Execute (1). Each category has a recommended default policy.
Open source. One binary. Zero dependencies.
npx -y @policylayer/intercept