Skip to main content

Module tools

Module tools 

Source

Modules§

admitted_sources
Admitted acquisition for tools (G01): the engine’s core::admitted_sources, plus the root of one tool call.
autonomy
The session wake-up briefing and one-shot efficiency hints. The read-path drivers (session-start preload, related hints, silent import preload, prefetch, auto-dedup) were retired on 2026-10-17: an A/B on the retrieval corpus returned byte-identical responses and equal R@5/MRR with them off, while the session start cost 2-14 s more.
ctx_agent
ctx_architecture
ctx_architecture — Graph-based architecture analysis tool.
ctx_artifacts
ctx_callgraph
ctx_compile
ctx_compile – Context compilation tool.
ctx_compose
ctx_compose — task composer (Phase 2 of the efficiency epic).
ctx_compress
ctx_compress_memory
ctx_context
ctx_control
ctx_control – Universal context manipulation tool.
ctx_cost
ctx_dedup
ctx_delta
ctx_discover
ctx_doc
ctx_doc: the project’s documentation in its Hive vault (C0 2.2 docs).
ctx_edit
ctx_execute
ctx_expand
ctx_explore
ctx_explore — FastContext-style bounded, deterministic repo exploration.
ctx_feedback
ctx_gain
ctx_glob
ctx_graph
ctx_graph_diagram
ctx_graph_diff
ctx_graph action=diff — what changed since a git ref, crossed with the dependency graph. For every changed file we report its blast radius (the transitive set of files that depend on it) and flag changes that touch god-nodes or bridges, so a reviewer immediately sees which commits are structurally risky. graphify-style “graph diff”, grounded in real git data.
ctx_graph_primitives
Graph primitives for ctx_graph: neighbors, path (shortest path) and explain. These are graphify-style traversal/inspection helpers that work on the same file-level graph the dashboard renders (GraphProvider::edges), so the MCP answers and the visual graph always agree.
ctx_handoff
ctx_heatmap
ctx_impact
ctx_impact — Graph-based impact analysis tool.
ctx_index
ctx_knowledge
ctx_knowledge_relations
ctx_metrics
ctx_multi_read
Byte cap shared by batch reads (ctx_read with paths).
ctx_multi_repo
ctx_outline
ctx_outline — fast, syntax-aware code outline (a “table of contents”).
ctx_overview
ctx_pack
ctx_package
ctx_package business logic (#293): save/resume portable context packages.
ctx_patch
ctx_patch — hash-anchored editing (epic #1008).
ctx_plan
ctx_plan – Context planning tool.
ctx_prefetch
ctx_preload
ctx_proof
ctx_provider
ctx_read
ctx_refactor
ctx_response
ctx_search
ctx_semantic_search
ctx_session
ctx_share
ctx_shell
ctx_skillify
ctx_skillify business logic — codify recurring session patterns into versioned .cursor/rules/skillify-*.mdc files (#290).
ctx_smart_read
ctx_smells
ctx_smells — Code smell detection tool.
ctx_summary
ctx_summary business logic (#292): record + recall AI session summaries.
ctx_symbol
ctx_tools
ctx_tools business logic (#210): the MCP Tool-Catalog meta-tool.
ctx_transcript_compact
ctx_transcript_compact business logic (#hermes-engine).
ctx_tree
ctx_verify
ctx_work_graph
knowledge_shared
Re-export: the memory policy loader lives in core::knowledge_consolidate.
registered
search_hook
Search hot-path bridge for kernel evidence and repeat detection.
search_kernel
Evidence and repeated-query tracking for the search tool.
walk_guard
Shared root guard for the user-facing directory walks (ctx_search, ctx_tree, ctx_glob).

Structs§

LeanCtxServer
Central MCP server state: cache, session, metrics, and autonomy runtime.
ToolCallRecord
Recorded metrics for a single MCP tool invocation.

Enums§

CrpMode
Context Reduction Protocol mode controlling output verbosity.
InteractionMode
IDE interaction mode communicated via _meta.interactionMode in MCP requests. Controls which tools are advertised and callable — Plan mode restricts to read-only tools (see plan_mode_tools()), Agent mode exposes the full set.
SessionMode

Functions§

create_server
Creates a new LeanCtxServer with default configuration.
shutdown_stage
Name a shutdown stage that took a second or more, and return the start of the next one. A host waits a bounded time for the server to end after it closed the connection and kills it afterwards; without these lines a shutdown that outlives that wait leaves no trace of where the time went.

Type Aliases§

SharedCache
Thread-safe handle to the shared file content cache.