ckb

v8.0.3
io.github.SimplyLiz/ckb Checked 9 hours ago Published 10 months ago

Code intelligence MCP server — 80+ tools for navigation, impact analysis, and architecture

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

explore

Comprehensive area exploration returning structure, key symbols, and change hotspots in one call. Best starting point for file/directory/module questions. Aggregates: explainFile → searchSymbols → getCallGraph → getHotspots.

ParameterTypeDescription
target *stringFile, directory, or module path to explore
depthstringExploration thoroughness: shallow (quick overview), standard (balanced), deep (comprehensive)
focusstringAspect to emphasize: structure (symbols/types), dependencies (imports/exports), changes (hotspots/history)

understand

Comprehensive symbol deep-dive returning full context in one call. Ideal for 'what does X do?' or 'how does X work?' questions. Aggregates: searchSymbols → getSymbol → explainSymbol → findReferences → getCallGraph.

ParameterTypeDescription
query *stringSymbol name or ID to understand
includeCallGraphbooleanInclude callers and callees
includeReferencesbooleanInclude reference information grouped by file
maxReferencesnumberMaximum references to include

prepareChange

Pre-change impact analysis showing blast radius, affected tests, coupled files, and risk score. Essential before modifying, renaming, or deleting code to prevent breaking changes.

ParameterTypeDescription
target *stringSymbol ID or file path to analyze
changeTypestringType of change being planned

batchGet

Retrieve multiple symbols by ID in a single call. Max 50 symbols.

ParameterTypeDescription
symbolIds *arrayArray of symbol IDs to retrieve (max 50)

batchSearch

Perform multiple symbol searches in a single call. Max 10 queries.

ParameterTypeDescription
queries *arrayArray of search queries (max 10)

searchSymbols

Semantic code search returning symbol types, locations, and relationships—more accurate than text-based grep/find.

ParameterTypeDescription
query *stringSearch query (substring match, case-insensitive)
kindsarrayOptional list of symbol kinds to filter (e.g., 'class', 'function')
limitnumberMaximum number of results to return
scopestringOptional module ID to limit search scope

getSymbol

Get symbol metadata and location by stable ID

ParameterTypeDescription
symbolId *stringThe stable symbol ID (ckb:<repo>:sym:<fingerprint>)
repoStateModestringWhether to use HEAD commit only or full working tree state

explainSymbol

Get an AI-friendly explanation of a symbol including usage, history, and summary

ParameterTypeDescription
symbolId *stringThe stable symbol ID to explain

explainFile

Get lightweight orientation for a file including role, symbols, and key relationships

ParameterTypeDescription
filePath *stringPath to the file (relative or absolute)

findReferences

Find all references to a symbol with completeness information

ParameterTypeDescription
symbolId *stringThe stable symbol ID
limitnumberMaximum number of references to return
mergestringBackend merge strategy
scopestringOptional module ID to limit search scope

getCallGraph

Get a lightweight call graph showing callers and callees of a symbol

ParameterTypeDescription
symbolId *stringThe root symbol ID for the call graph
depthnumberMaximum depth to traverse (1-4)
directionstringWhich direction to traverse

traceUsage

Trace how a symbol is reached from system entrypoints. Returns causal paths, not just neighbors.

ParameterTypeDescription
symbolId *stringThe target symbol ID to trace usage for
maxDepthnumberMaximum path depth to traverse (1-5)
maxPathsnumberMaximum number of paths to return

getArchitecture

Get codebase architecture with module dependencies. For single-module projects, use granularity='directory' or 'file' for meaningful visualization.

ParameterTypeDescription
depthnumberMaximum dependency depth to traverse
granularitystringLevel of detail: 'module' (packages), 'directory' (folders), 'file' (individual files)
includeExternalDepsbooleanWhether to include external dependencies
includeMetricsbooleanInclude aggregate metrics (complexity, churn) per directory. Only applies to directory granularity.
inferModulesbooleanInfer modules from directory structure when no explicit package boundaries exist
refreshbooleanForce refresh of cached architecture
targetPathstringOptional path to focus on (relative to repo root)

getModuleOverview

Get a high-level overview of a module including size and recent activity

ParameterTypeDescription
namestringOptional friendly name for the module
pathstringPath to the module directory

listKeyConcepts

Discover main ideas/concepts in the codebase through semantic clustering. Helps understand domain vocabulary.

ParameterTypeDescription
limitnumberMaximum number of concepts to return (max 12)

analyzeImpact

Analyze the impact of changing a symbol. Returns callers, affected modules, and risk score—answers 'what breaks if I change X?'. For comprehensive pre-change analysis, use prepareChange instead.

ParameterTypeDescription
symbolId *stringThe stable symbol ID to analyze
depthnumberMaximum depth for transitive impact analysis
includeTelemetrybooleanInclude observed telemetry data in analysis (requires telemetry to be enabled)
telemetryPeriodstringTime period for telemetry data (7d, 30d, 90d, all)

getHotspots

Find files that deserve attention based on churn, coupling, and recency. Highlights volatile areas that may need review.

ParameterTypeDescription
limitnumberMaximum number of hotspots to return (max 50)
scopestringModule path to focus on
timeWindowobjectTime period to analyze (default: 30 days)

getStatus

Get CKB system status including backend health, cache stats, repository state, and usage hints for available capabilities.

expandToolset

Add more tools for a specific workflow. Available presets: review, refactor, federation, docs, ops, full.

ParameterTypeDescription
preset *stringThe preset to expand to
reason *stringWhy you need this preset (required to prevent accidental expansion)