Appendix

July 2, 2026 · View on GitHub

Every tool lean-ctx registers via rust/src/server/registry.rs. Your AI editor calls these instead of its native file/search tools. The Profile column shows the smallest tool profile that exposes the tool (M minimal, S standard, P power). Set your profile with lean-ctx tools <minimal|standard|power>.

Authoritative parameter schemas live in rust/src/tools/registered/<tool>.rs (tool_def()). This map is the human index.

Tool profiles at a glance

ProfileCountWho it's for
minimal5Lowest context overhead; the absolute essentials
standard16Balanced default for most coding workflows
power76Everything (default for existing installs)
  • minimal (5): ctx_read, ctx_shell, ctx_search, ctx_glob, ctx_tree
  • standard (+11): + ctx_compose, ctx_explore, ctx_knowledge, ctx_callgraph, ctx_graph, ctx_delta, ctx_execute, ctx_expand, ctx_overview, ctx_url_read, ctx_patch
  • power (+47): all remaining tools.

1. Core — read / search / shell

ToolPurposeKey params / actionsProfile
ctx_readRead a file with session cache + compression; re-reads ~13 tokens when unchangedpath*, mode (full|raw|map|signatures|diff|aggressive|entropy|task|reference|lines:N-M|auto), start_line, freshM
ctx_multi_readRead many files in one call (same modes)paths[]*, mode, freshS
ctx_smart_readAuto-pick the optimal read mode for a filepath*P
ctx_deltaIncremental diff — only lines changed since last readpath*S
ctx_editLegacy search-and-replace edit; preimage guards, backuppath, new_string, old_string, replace_all, createP
ctx_patchHash-anchored line edits — LINE:HASH anchors from ctx_read mode=anchored; no exact-recall, batch-atomic, tree-sitter gate, create for new filespath*, ops[] (set_line|replace_lines|insert_after|delete|replace_symbol|create)S
ctx_fillBudget-aware context fill within a token limitpaths[], budget*, taskP
ctx_symbolRead just one named symbol block (fn/struct/class)name*, file, kindP
ctx_outlineList all symbols of a file with signaturespath*, kindP
ctx_retrieveFetch uncompressed original from cache (CCR)path*, queryP
ctx_shellRun shell commands with pattern compressioncommand*, raw, cwdM
shellAlias of ctx_shell (same compression) for clients whose model reaches for a native shell/bash tool — e.g. Codex Desktop / Codex Cloudcommand*, raw, cwdM
ctx_searchRegex search across the codebase, token-efficientpattern*, path, include (glob, e.g. *.{rs,ts}), ext (deprecated alias), max_results, ignore_gitignoreM
ctx_globFind files by glob pattern (path match), gitignore-aware, multi-root, deterministically sortedpattern*, path, paths[], max_results, ignore_gitignoreP
ctx_treeCompact directory tree with file countspath, depth, show_hiddenM
ctx_semantic_searchSemantic search (BM25 + embeddings / hybrid)query*, action (search|reindex|find_related), mode (bm25|dense|hybrid), top_kS
ctx_composeTask composer: keywords + ranked files + matches + top symboltask*, pathP
ctx_exploreIterative, deterministic exploration → compact path:start-end citations (BM25 + static graph + AST symbols, bounded turns); cheaper than ctx_compose for locating code across filesquery*, path, max_turns, citationS
ctx_executeSandboxed code execution (11 languages); only stdout enters contextlanguage, code, action, timeoutS
ctx_multi_repoMulti-repo management + cross-repo search (RRF)action (add_root|remove_root|list_roots|search|status|save_config)P
ctx_url_readFetch a web page, PDF, RSS/Atom feed, or YouTube video as compressed, cited context (HTML→Markdown incl. GFM tables, PDF→text, feeds→dated items, transcript; GitHub blob/raw URLs auto-resolve to the raw file; facts/quotes carry confidence + source); SSRF-guardedurl*, mode (auto|markdown|text|links|facts|quotes|transcript), query, max_tokens, max_items, timeout_secsS
ctx_git_readRead a remote git repo via a cached shallow clone instead of scraping its web pageurl*, mode (overview|tree|read|grep), path, ref, query, max_tokensP

2. Memory & knowledge

ToolPurposeKey actionsProfile
ctx_knowledgePersistent project knowledge base across sessionsremember|recall|search|relate|consolidate|timeline|rooms|wakeup|status|export|removeS
ctx_compressContext checkpoint for long conversationsinclude_signaturesS
ctx_compress_memoryCompress memory/config files (CLAUDE.md, .cursorrules); backs up .original.mdpath*P
ctx_artifactsContext-artifact registry with BM25 searchlist|status|index|reindex|search|removeP
ctx_indexBuild & manage the code indexstatus|build|build-fullP

3. Session & multi-agent

ToolPurposeKey actionsProfile
ctx_sessionCross-session memory (CCP): tasks, findings, decisions, snapshotsstatus|load|save|task|finding|decision|snapshot|restore|resume|diff|verifyM
ctx_checkpointSnapshot / diff / restore the agent's code changes via a shadow git history kept outside the project's .gitsnapshot|log|diff|restore; message, from, to, ref, path, limitP
ctx_agentMulti-agent coordination + message busregister|list|post|read|handoff|sync|diary|share_knowledgeS
ctx_shareShare cached file contexts between agentspush|pull|list|clearP
ctx_taskMulti-agent task orchestration (A2A)create|update|list|get|cancel|messageP
ctx_handoffContext Ledger Protocol — deterministic handoff bundlescreate|show|list|pull|export|importP
ctx_workflowWorkflow state machine with evidence trackingstart|status|transition|complete|evidence_addP

4. Code intelligence & graph

ToolPurposeKey actionsProfile
ctx_graphUnified code graph: deps, symbols, impactbuild|related|symbol|impact|context|diagramP
ctx_callgraphCall-graph queries (BFS, trace, risk)callers|callees|trace|riskS
ctx_impactGraph-based impact / blast-radius analysisanalyze|diff|chain|build|update|statusS
ctx_architectureArchitecture analysis over the property graphoverview|clusters|layers|cycles|entrypoints|hotspots|healthS
ctx_repomapPageRank-ranked map of the most important symbolsmax_tokens, focus_files[]S
ctx_routesExtract HTTP routes (Express, Flask, FastAPI, Actix, Spring, Rails, Next.js)method, pathS
ctx_refactorLSP-backed refactoringrename|references|definition|implementationsS
ctx_reviewAutomated code review (impact, callers, tests, smells)review|diff-review|checklistP
ctx_smellsCode-smell detection (8 rules over property graph)scan|summary|rules|fileP
ctx_packContext Package Manager (PR packs, installable context)pr|create|list|info|install|export|import|auto_loadS

5. Analytics & gain

ToolPurposeKey actionsProfile
ctx_metricsSession token stats, cache rates, per-tool savingsP
ctx_radarFull context-budget breakdown (prompt, messages, tools, reads, shell)formatP
ctx_costLocal cost attribution per agent/toolreport|agent|tools|resetP
ctx_gainGain report incl. "Wrapped" summarystatus|report|score|wrapped|agents|jsonP
ctx_heatmapFile-access heatmapstatus|directory|cold|jsonP
ctx_benchmarkBenchmark compression modes for a file/projectpath*, action, formatP
ctx_analyzeEntropy analysis — recommends optimal compression modepath*P
ctx_comparePreview compression — original vs the bytes lean-ctx would emit, with token counts + line diff (read-only)path | content+ext | command+outputP
ctx_feedbackHarness feedback for LLM output tokens & latencyrecord|report|resetP
ctx_discoverFind missed compression opportunities in shell historylimitP
ctx_verifyVerification observability + ContextProofV2stats|proof|v2P
ctx_proofExport machine-readable ContextProofV1export*P

6. Advanced — providers / plugins / proactive context

ToolPurposeKey actionsProfile
ctx_providerExternal context providers (GitHub, GitLab, Jira, Postgres, MCP bridges)discover|list|status|refresh|configure|query|gitlab_issues|gitlab_mrsP
ctx_toolsMCP Tool-Catalog Gateway — route/proxy unlimited downstream MCP servers at constant context costfind|call|list|refreshP
ctx_pluginsPlugin managementlist|enable|disable|info|hooksP
ctx_rulesCross-agent rules governance (ContextOps)sync|diff|lint|status|initP
ctx_skillifyCodify recurring session-diary + knowledge patterns into versioned, git-committable .cursor/rules/skillify-*.mdc (precision-biased, idempotent)mine|list|status|promote; slugP
ctx_summaryRecord + recall AI session summaries (semantic when warm, else lexical); auto-captured on the checkpoint cadencerecall|record|list; query, top_kP
ctx_packageSave/resume portable context packages (session + summaries + knowledge bundle) for agent handoffs or session persistencesave|resume|list|info; path, descriptionP
ctx_overviewTask-relevant project map — ideal at session starttask, pathS
ctx_preloadProactively load task-relevant files; compact L-curve summarytask*, pathP
ctx_prefetchPredictive prefetch for blast-radius filesroot, task, changed_files[], budget_tokensP

7. Meta — context-field-theory / dispatch / dynamic tools

ToolPurposeKey actionsProfile
ctx_callCall any lean-ctx tool by name (lazy-loading)name*, argumentsP
ctx_discover_toolsKeyword search across all available toolsqueryP
ctx_load_toolsLoad/unload dynamic tool categories at runtimeload|unload|list; categoryP
ctx_controlContext Field Theory — overlay-based context manipulationexclude|include|pin|unpin|set_view|set_priority|reset|listP
ctx_planContext planning (CFT) with Phi scoring + budget allocationtask*, budget, profileP
ctx_compileContext compilation via knapsack + Boltzmann view selectionmode, budgetP
ctx_contextSession-context overview (cache, seen files, state)P
ctx_ledgerContext-ledger ops for pressure managementstatus|reset|evictP
ctx_cacheSession-cache operationsstatus|clear|invalidateP
ctx_dedupCross-file deduplicationanalyze|applyP
ctx_intentStructured intent input with routing policyquery*, formatP
ctx_responseCompress LLM response text (strip filler, TDD)text*P
ctx_expandZero-loss retrieval of archived tool outputsretrieve|list|search_allP

* = required parameter.

Notes

  1. power enables all 80 tools; ToolProfile::is_tool_enabled() returns true for everything under power.
  2. ctx_load_tools controls dynamic categories (arch, debug, memory, metrics, session) independently of the static profile filter.
  3. Lazy clients use ctx_call + ctx_discover_tools + ctx_load_tools to reach tools not in their active profile without listing all 79 upfront.