Skip to content

Presets

Lisa edited this page Feb 1, 2026 · 6 revisions

Tool Presets

CKB exposes 90+ tools via MCP, but most sessions only need a subset. Presets group tools by workflow, reducing token overhead by up to 83% while maintaining full functionality.

Why Presets Matter

"My MCP tools were consuming 66,000+ tokens before I even started a conversation." — Community feedback

Every MCP tool definition consumes context window tokens. With 80+ tools, the full tools/list response costs ~9,000 tokens before you even ask a question. Presets solve this by exposing only relevant tools.

Quick Reference

# List all available presets
ckb mcp --list-presets

# Start with a specific preset
ckb mcp --preset=review

Output:

Available presets:

  PRESET        TOOLS         TOKENS  DESCRIPTION
  ------        -----         ------  -----------
  core             21     ~3k tokens  Quick navigation, search, impact analysis (default)
  review           27     ~3k tokens  Code review with ownership and PR summaries
  refactor         33     ~4k tokens  Refactoring analysis with coupling, dead code, cycles
  federation       35     ~4k tokens  Multi-repo queries and cross-repo visibility
  docs             27     ~3k tokens  Documentation-symbol linking and coverage
  ops              33     ~4k tokens  Diagnostics, daemon, webhooks, jobs
  full             92     ~11k tokens Complete feature set (all tools)

Use: ckb mcp --preset=<name>

Preset Details

core (Default)

21 tools | ~3k tokens

The default preset enables the "Investigate & Assess Impact" workflow—sufficient for most coding sessions.

Category Tools
Discovery searchSymbols, getSymbol
Understanding explainSymbol, explainFile, findReferences, getCallGraph, traceUsage
Architecture getArchitecture, getModuleOverview, listKeyConcepts
Impact analyzeImpact, getHotspots
Refactoring planRefactor
System getStatus, switchProject, expandToolset

Best for: General development, debugging, understanding code, assessing change impact.


review

27 tools | ~3k tokens (core + 6 tools)

Code review workflow with ownership and PR analysis.

Added Tools Purpose
summarizeDiff Analyze git diffs with symbol-level context
summarizePr Comprehensive PR analysis with risk assessment
getOwnership CODEOWNERS + git-blame analysis
getOwnershipDrift Detect ownership changes over time
recentlyRelevant Find recently modified related code
scanSecrets Secret detection for PR reviews

Best for: Pull request reviews, understanding who owns what, reviewing changes.


refactor

33 tools | ~4k tokens (core + 12 tools)

Refactoring analysis with coupling detection, dead code identification, cycle detection, and proactive suggestions.

Added Tools Purpose
justifySymbol Explain why a symbol exists (trace to entrypoints)
analyzeCoupling Detect co-change patterns from git history
findDeadCodeCandidates Identify potentially unused code (telemetry-based)
findDeadCode Static dead code detection (no telemetry needed)
getAffectedTests Find tests affected by changes
compareAPI Breaking change detection
auditRisk Multi-factor risk scoring (8 weighted factors)
explainOrigin Trace symbol history through renames
scanSecrets Secret detection for security audits
analyzeTestGaps Find functions lacking test coverage (v8.1)
planRefactor Unified refactoring planner (v8.1, also in core)
findCycles Dependency cycle detection with Tarjan's SCC (v8.1)
suggestRefactorings Proactive refactoring suggestions (v8.1)

Best for: Refactoring planning, identifying dead code, understanding dependencies, cycle detection.


docs

27 tools | ~3k tokens (core + 6 tools)

Documentation-symbol linking and coverage analysis.

Added Tools Purpose
indexDocs Index markdown documentation
getDocsForSymbol Find documentation mentioning a symbol
getSymbolsInDoc Find symbols referenced in a document
getDocsForModule Get documentation for a module
checkDocStaleness Detect outdated documentation
getDocCoverage Documentation coverage metrics

Best for: Documentation maintenance, finding related docs, checking doc freshness.


ops

33 tools | ~4k tokens (core + 12 tools)

Operational tools for daemon management, jobs, and webhooks.

Added Tools Purpose
doctor Diagnose configuration issues
daemonStatus Check daemon health
listJobs, getJobStatus, cancelJob Background job management
listSchedules, runSchedule Scheduled task management
listWebhooks, testWebhook, webhookDeliveries Webhook management
getWideResultMetrics Tool response size analytics

Best for: CKB administration, debugging indexing issues, monitoring.


federation

35 tools | ~4k tokens (core + 14 tools)

Multi-repository queries and cross-repo visibility.

Added Tools Purpose
listFederations List configured federations
federationStatus Federation health check
federationRepos List repos in a federation
federationSearchModules Search modules across repos
federationSearchOwnership Find owners across repos
federationGetHotspots Cross-repo hotspot analysis
federationSync Sync federation data
federationAddRemote, federationRemoveRemote Manage remote repos
federationListRemote, federationSyncRemote, federationStatusRemote Remote repo operations
federationSearchSymbolsHybrid Hybrid local+remote symbol search
federationListAllRepos List all federated repos

Best for: Monorepos, microservices, cross-repository dependency analysis.


full

92 tools | ~11k tokens

All available tools. Use when you need capabilities not covered by other presets.

Best for: Power users, when you need everything, legacy compatibility.


Dynamic Expansion

The expandToolset meta-tool (included in all presets) allows the AI to request additional tools mid-session:

{
  "name": "expandToolset",
  "arguments": {
    "preset": "federation",
    "reason": "User asked about cross-repository dependencies"
  }
}

Guardrails:

  • Requires a reason (minimum 10 characters)
  • Rate-limited to one expansion per session
  • Emits tools/list_changed notification for compliant clients

This means you can start with core and let the AI expand when needed, rather than loading everything upfront.


MCP Configuration

Claude Code / Cursor / Windsurf

{
  "mcpServers": {
    "ckb": {
      "command": "npx",
      "args": ["@tastehub/ckb", "mcp", "--preset=review"]
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "ckb": {
      "command": "npx",
      "args": ["@tastehub/ckb", "mcp", "--preset=core", "--repo", "/path/to/repo"]
    }
  }
}

Token Efficiency Visibility

CKB shows token savings at startup:

CKB MCP Server v7.5.0
  Active tools: 14 / 76 (18%)
  Estimated context: ~2k tokens
  Preset: core

The getStatus tool also returns token efficiency metrics:

{
  "preset": {
    "active": "core",
    "exposed": 14,
    "total": 76,
    "expanded": false,
    "estimatedTokens": 1529,
    "fullPresetTokens": 9040,
    "tokenSavings": "83%"
  }
}

Choosing a Preset

If you're... Use
Just exploring code core (default)
Reviewing a PR review
Planning a refactor refactor
Updating documentation docs
Debugging CKB itself ops
Working across repos federation
Not sure / need everything full

When in doubt, start with core. The AI can expand if needed.


See Also

Clone this wiki locally