You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--no-builtin-tools / -nbt: disable built-in tools but keep extension/custom tools
Summary
Add a separate --no-builtin-tools (-nbt) flag, distinct from a hypothetical --no-tools. The flag disables only the built-in tools (read, write, edit, bash, grep, find, ls, etc.) while leaving extension-provided tools, MCP tools, and custom tools enabled.
Reference: pi-mono Tool Options — distinguishes --no-builtin-tools from --no-tools.
Why
Running an extension-only or MCP-only session is currently awkward because there is no clean way to silence built-ins without also silencing what the user actually wants.
Combining --no-builtin-tools with --tools <list> (already a planned/existing flag) lets users build a deterministic minimum tool surface, useful for security demos and conformance testing.
Current state in jcode
src/cli/args.rs has --tools <list> style options but no--no-builtin-tools flag.
The tool registry that needs to gate built-ins lives in src/tool/mod.rs and crates/jcode-tool-core/.
Add no_builtin_tools: bool (short -nbt, global) to Args in src/cli/args.rs.
2. Registry
In whatever construction step builds the active tool list, skip built-ins when args.no_builtin_tools is true.
Built-ins set: read, write, edit, multiedit, apply_patch, bash, grep, find/glob, ls, agentgrep, webfetch, websearch, todo, memory, skill, task, communicate (mark which of these are user-facing built-ins vs internal — exclude task / communicate / todo from the gate since they are infrastructure tools).
3. Combine with explicit --tools
When both --no-builtin-tools and --tools are set, the explicit --tools list wins for the named built-ins (so users can re-enable individual ones without losing extensions).
Testing
Unit test in src/agent_tests.rs: starting a session with --no-builtin-tools exposes zero built-in tools to the model.
Combined with --tools read: only read is exposed.
MCP tools and extension tools (mocked) remain enabled.
Acceptance criteria
jcode --no-builtin-tools "..." runs and the model sees only extension/MCP/custom tools.
jcode --no-builtin-tools --tools read "..." runs and the model sees read plus non-built-ins.
--no-builtin-tools/-nbt: disable built-in tools but keep extension/custom toolsSummary
Add a separate
--no-builtin-tools(-nbt) flag, distinct from a hypothetical--no-tools. The flag disables only the built-in tools (read,write,edit,bash,grep,find,ls, etc.) while leaving extension-provided tools, MCP tools, and custom tools enabled.Reference: pi-mono Tool Options — distinguishes
--no-builtin-toolsfrom--no-tools.Why
--no-builtin-toolswith--tools <list>(already a planned/existing flag) lets users build a deterministic minimum tool surface, useful for security demos and conformance testing.Current state in jcode
src/cli/args.rshas--tools <list>style options but no--no-builtin-toolsflag.src/tool/mod.rsandcrates/jcode-tool-core/.src/mcp/) flow through a different registration path.Implementation checklist
1. CLI
no_builtin_tools: bool(short-nbt, global) toArgsinsrc/cli/args.rs.2. Registry
args.no_builtin_toolsis true.read,write,edit,multiedit,apply_patch,bash,grep,find/glob,ls,agentgrep,webfetch,websearch,todo,memory,skill,task,communicate(mark which of these are user-facing built-ins vs internal — excludetask/communicate/todofrom the gate since they are infrastructure tools).3. Combine with explicit
--tools--no-builtin-toolsand--toolsare set, the explicit--toolslist wins for the named built-ins (so users can re-enable individual ones without losing extensions).Testing
src/agent_tests.rs: starting a session with--no-builtin-toolsexposes zero built-in tools to the model.--tools read: onlyreadis exposed.Acceptance criteria
jcode --no-builtin-tools "..."runs and the model sees only extension/MCP/custom tools.jcode --no-builtin-tools --tools read "..."runs and the model seesreadplus non-built-ins.--helpand README document the precedence.Cross-references
/settingsUI for config inspection and edits #7 —/settingsUI should mention this gate.Reference