Environment
- lean-ctx 3.9.12 (official Homebrew build), macOS
- Client: Claude Code
- Active tool profile:
lean (default)
Summary
lean-ctx wrap claude (and init) writes MCP tool entries into Claude Code's ~/.claude/settings.json under permissions.allow. The seeded set does not match the tools the active lean profile advertises: it omits tools that are directly callable and includes several that are reachable only through the ctx_call gateway. In Claude Code's permission syntax (mcp__<server>__<tool>), an allow entry for a gateway-only tool never matches a real call, because the invocation is mcp__lean-ctx__ctx_call.
Seeded set (3.9.12)
ctx_read, ctx_search, ctx_tree, ctx_overview, ctx_plan, ctx_metrics, ctx_compress, ctx_session, ctx_knowledge, ctx_graph, ctx_retrieve, ctx_provider
Problems
- Omits the
lean-advertised tools that are directly callable and used most: ctx_glob, ctx_compose, ctx_expand, ctx_callgraph, ctx_patch, ctx_shell, ctx_call. Those are the entries that would actually take effect; none are seeded.
- Includes tools that are gateway-only in
lean, producing dead allow entries: ctx_overview, ctx_graph, ctx_plan, ctx_metrics, ctx_compress, ctx_retrieve, ctx_provider. All exist (per ctx_discover_tools) but are not standalone MCP tools in lean.
- The seeded set matches no shipped profile boundary (
lean, standard, or power), consistent with the outdated tool taxonomy behind the SKILL.md "Core Tools" table.
Direct callability of the seeded gateway-only names, by profile
| Tool |
lean (12) |
standard (17) |
power (81) |
ctx_overview |
gateway-only |
direct |
direct |
ctx_graph |
gateway-only |
direct |
direct |
ctx_plan |
gateway-only |
gateway-only |
direct |
ctx_metrics |
gateway-only |
gateway-only |
direct |
ctx_compress |
gateway-only |
gateway-only |
direct |
ctx_retrieve |
gateway-only |
gateway-only |
direct |
ctx_provider |
gateway-only |
gateway-only |
direct |
Profile switch does not reconcile the allowlist
Switching profiles (lean-ctx tools <name> or lean-ctx profile <name>) changes only the advertised MCP tool set; it does not modify ~/.claude/settings.json. A stale seeded allowlist is therefore never corrected by a later profile change. To reproduce: compare ~/.claude/settings.json before and after a profile switch; it is byte-identical.
Suggested fix
Seed permissions.allow from the active profile's advertised tool set at wrap/init time (the same source that should drive the SKILL.md "Core Tools" table), so the documentation, the advertised tools, and the seeded allowlist stay in sync. Optionally reconcile the allowlist on profile switch.
Related
The SKILL.md "Core Tools (10 always visible)" table shows the same taxonomy drift (same root cause).
Environment
lean(default)Summary
lean-ctx wrap claude(andinit) writes MCP tool entries into Claude Code's~/.claude/settings.jsonunderpermissions.allow. The seeded set does not match the tools the activeleanprofile advertises: it omits tools that are directly callable and includes several that are reachable only through thectx_callgateway. In Claude Code's permission syntax (mcp__<server>__<tool>), an allow entry for a gateway-only tool never matches a real call, because the invocation ismcp__lean-ctx__ctx_call.Seeded set (3.9.12)
ctx_read,ctx_search,ctx_tree,ctx_overview,ctx_plan,ctx_metrics,ctx_compress,ctx_session,ctx_knowledge,ctx_graph,ctx_retrieve,ctx_providerProblems
lean-advertised tools that are directly callable and used most:ctx_glob,ctx_compose,ctx_expand,ctx_callgraph,ctx_patch,ctx_shell,ctx_call. Those are the entries that would actually take effect; none are seeded.lean, producing dead allow entries:ctx_overview,ctx_graph,ctx_plan,ctx_metrics,ctx_compress,ctx_retrieve,ctx_provider. All exist (perctx_discover_tools) but are not standalone MCP tools inlean.lean,standard, orpower), consistent with the outdated tool taxonomy behind the SKILL.md "Core Tools" table.Direct callability of the seeded gateway-only names, by profile
ctx_overviewctx_graphctx_planctx_metricsctx_compressctx_retrievectx_providerProfile switch does not reconcile the allowlist
Switching profiles (
lean-ctx tools <name>orlean-ctx profile <name>) changes only the advertised MCP tool set; it does not modify~/.claude/settings.json. A stale seeded allowlist is therefore never corrected by a later profile change. To reproduce: compare~/.claude/settings.jsonbefore and after a profile switch; it is byte-identical.Suggested fix
Seed
permissions.allowfrom the active profile's advertised tool set atwrap/inittime (the same source that should drive the SKILL.md "Core Tools" table), so the documentation, the advertised tools, and the seeded allowlist stay in sync. Optionally reconcile the allowlist on profile switch.Related
The SKILL.md "Core Tools (10 always visible)" table shows the same taxonomy drift (same root cause).