ドキュメント

ツールリファレンス

全58の LeanCTX MCP ツールの完全リファレンス(カテゴリ別)。

LeanCTX は4つのカテゴリに整理された58の MCP ツールを提供します。各ツールは AI が自動的に使用します - これらのコマンドを覚えたり入力する必要はありません。

コアツール - ファイル&コード

基盤となるツール群です。ファイル読み取り、ディレクトリ探索、コマンド実行、コード検索を担当します - AI コーディング操作の90%を占めます。

ツール機能節約量
ctx_read10 read modes + セッション cache を備えたスマートファイル読み取りup to 99%
ctx_multi_read1回の呼び出しで複数ファイルをバッチ読み取りラウンドトリップの削減
ctx_treeコンパクトなプロジェクト構造マップ34-60%
ctx_shell95以上のパターン圧縮付きシェルコマンド。非圧縮出力には raw=true を使用。
ctx_searchコンパクトな結果の正規表現コード検索50-80%
ctx_editContext-aware file editor with create, replace, and replace_all-
ctx_deltaShow only changed lines since last read80-95%
ctx_smart_readIntelligent single-call read with auto-modevaries

コアツールの詳細ドキュメントを見る →


インテリジェンスエンジン

圧縮を超えたツール群 - ワークフローを理解し、意図を検出し、コンテキストを重複排除し、token予算をインテリジェントに管理します。

ツール機能
ctx_filltoken予算による優先度ベースのコンテキスト充填
ctx_intentセマンティック意図検出 + 自動ファイルロード
ctx_contextマルチターンのコンテキスト状態概要
ctx_graph永続的なプロジェクト依存関係グラフ(build、related、symbol、impact)
ctx_dedupクロスファイル重複排除分析
ctx_response双方向レスポンス圧縮
ctx_discover圧縮の機会を逃したシェル履歴の分析
ctx_preloadプロアクティブなコンテキストローダー - セッション開始時にタスク関連ファイルをキャッシュ
ctx_semantic_searchハイブリッド意味検索(BM25 + 埋め込み)- キーワードが一致しなくても意味でコードを検索
ctx_overviewProject overview with structure, entry points, and key files
ctx_prefetchPre-load files based on task context and changed files
ctx_graph_diagram依存グラフ/コールグラフの Mermaid 図
ctx_compress_memoryメモリ/設定 Markdown を圧縮(コード/URL保持)+ .original バックアップ
ctx_impactImpact analysis: trace dependency chains and build graphs
ctx_architectureGraph-based architecture analysis: clusters, layers, cycles
ctx_analyzeEntropy analysis - recommends optimal compression mode

インテリジェンスエンジンの詳細ドキュメントを見る →


セッション&モニタリング

セッションの永続化、パフォーマンス監視、圧縮分析、ベンチマーク - token節約を測定・最適化するために必要なすべて。

ツール機能
ctx_sessionクロスチャットのセッションメモリ(タスク、発見事項、決定事項)
ctx_compressチャット継続のためのコンパクトなコンテキストチェックポイント
ctx_benchmarkモードごとの実際のtoken数 - 単一ファイルまたはプロジェクト全体
ctx_metricsUSD コスト見積もり付きセッション統計
ctx_wrapped節約レポートカード(週次 / 月次 / 全期間)
ctx_cache明示的な cache 管理(状態確認、クリア、無効化)
ctx_gainQuery token savings, GainScore (0–100), cost breakdowns, task classifications, and per-agent statistics. Powered by the GainEngine with embedded ModelPricing.
ctx_heatmapFile access heatmap - find hot files and cold directories

セッション&モニタリングの詳細ドキュメントを見る →


メモリ&マルチエージェント

クロスセッションメモリ、マルチエージェント調整、タスク対応のプロジェクトオリエンテーション。v2.7.0の新機能。

ツール機能
ctx_knowledge永続的なプロジェクト知識ストア - セッション間で事実を記憶
ctx_agentマルチエージェント調整 - 登録、投稿、タスクハンドオフ、ステータス同期
ctx_shareマルチエージェントコンテキスト共有 - エージェント間のキャッシュファイルのプッシュ/プル
ctx_taskTask delegation and tracking across agents
ctx_costCost attribution - track token spend per agent and tool
ctx_contextマルチターンのコンテキスト状態概要

メモリ&マルチエージェントの詳細ドキュメントを見る →


Workflow & Orchestration

State machines, context handoff, sandboxed code execution, and quality feedback loops.

ツール機能
ctx_workflowState-machine workflows with step ordering and evidence
ctx_handoffContext transfer between sessions or agents
ctx_executeSandboxed code execution in 11 languages
ctx_feedbackQuality feedback: latency, token counts, model info

View Workflow & Orchestration docs →


Analysis & Navigation

Tree-sitter-powered symbol navigation, call graphs, route extraction, and structural outlining.

ツール機能
ctx_symbolFind symbol definitions across 18 languages
ctx_callersFind all call sites of a function
ctx_calleesFind all functions called by a symbol
ctx_outlineStructural outline of a file
ctx_routesExtract HTTP routes from web frameworks
ctx_smellsCode smell detection with graph-enriched scoring (long functions, deep nesting, complexity)
ctx_smellsDetect code smells and anti-patterns

View Analysis & Navigation docs →