MCPVault

find_dead_imports

MCP tool from CodeGraph by codegraph-ai

Find unused imports — modules imported but never referenced

How to use it

find_dead_imports is exposed by the CodeGraph MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the find_dead_imports tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.

Install CodeGraph

$npx @vscode/vsce package # VSIX
FULL CODEGRAPH LISTING

Other tools in CodeGraph (39)

analyze_complexity

Cyclomatic complexity with breakdown (branches, loops, nesting, exceptions, early returns)

analyze_coupling

Module coupling metrics and instability scores

analyze_impact

Blast radius prediction — what breaks if you modify, delete, or rename

core

8 — search + symbol info + AI context

design_gaps

Find identifiers described in docs that don't exist in code yet — build TODO lists from specs

find_by_imports

Find files importing a module

find_by_signature

Search by param count, return type, modifiers

find_circular_deps

Detect circular import/dependency chains across files

find_entry_points

Main functions, HTTP handlers, CLI commands, event handlers

find_hot_paths

Most-called functions ranked by transitive caller count

find_implementors

Find all functions registered as ops struct callbacks

find_related_tests

Tests that exercise a given function

generate_architecture_doc

Auto-generate a structured ARCHITECTURE.md from the live code graph (modules, hot paths, complexity, circular deps)

get_ai_context

Primary context tool. Intent-aware (explain/modify/debug/test) with token budgeting. Returns source, related symbols, imports, siblings, debug hints.

get_call_graph

Function call chains (callers and callees)

get_curated_context

Cross-codebase context for a natural language query ("how does auth work?")

get_dependency_graph

File/module import relationships with depth control

get_detailed_symbol

Full symbol info: source, callers, callees, complexity

get_edit_context

Everything needed before editing: source + callers + tests + memories + git history

get_module_summary

High-level summary of a directory: file count, functions, language breakdown, top complex functions

get_symbol_info

Quick metadata: signature, visibility, kind

graph

17 — callers/callees/deps/impact/traverse/PR context

index_directory

Add directory to graph alongside existing data

index_files

Add/update specific files without full reindex

index_markdown

Index a local .md file (ARCHITECTURE.md, APIDESIGN.md, etc.) into the persistent docs store. Heading-tree chunking with leaf-node embeddings.

list_doc_sources

List all indexed source files

memory

14 — codegraphmemory plus the docs tools

memory_context

Get memories relevant to a file/function

pr_context

One-call PR review. Runs git diff against base branch, finds changed functions in the graph, reports: blast radius (callers), test coverage + gaps, affected modules, diff-aware change classification (signature vs body), stale-doc warnings, complexity, commit-message hint, suggested reviewers from gi

reindex_workspace

Full or incremental workspace reindex

remove_doc_source

Remove all indexed chunks from a source file

scan_security

Security vulnerability scan: 40+ dangerous function patterns, source-to-sink taint tracing, auth coverage for HTTP endpoints (7 languages/frameworks), architectural layer violations, weak crypto, hardcoded secrets

search_by_error

Find functions that throw, catch, or handle specific error types

search_by_pattern

Regex search across function bodies, signatures, names, and docstrings

search_docs

Semantic search over indexed docs — returns matching sections with heading-path breadcrumbs

security

pro security tools only (empty on community)

symbol_search

Find symbols by name or natural language (hybrid BM25 + semantic search)

traverse_graph

Custom graph traversal with edge/node type filters

verify_design

Cross-reference doc claims vs code graph. direction=forward (doc→code), reverse (code→doc), or both