File-oriented tool set
The core file workflow is built from these primitives:FileReadToolFileEditToolFileWriteToolNotebookEditToolGlobToolGrepToolTodoWriteTool
src/tools.ts keeps them in the default tool set, with GlobTool and GrepTool omitted only when the build exposes embedded search tools.
Why there are multiple write tools
The source separates file mutation by intent:FileEditTool: patch-style, targeted changesFileWriteTool: full write or rewriteNotebookEditTool: notebook-specific mutation path
Search versus read
Claude Code does not rely onFileReadTool for discovery. The intended read path is:
- discover candidate files with
GlobToolorGrepTool - read the relevant files with
FileReadTool - mutate with one of the write/edit tools
Approval profile
| Tool family | Typical approval posture |
|---|---|
Search (GlobTool, GrepTool) | Usually auto-allowed |
Read (FileReadTool) | Usually auto-allowed inside workspace |
| Edit / write | Frequently approval-gated |
| Notebook edit | Approval-gated |
Workspace and trust implications
File tools are not just path-based wrappers. They run inside a larger policy model that includes:- workspace validation
- additional working directory rules
- path safety checks
- policy and managed settings
- sandbox mode where relevant
path in repo.
Notebooks as a separate path
NotebookEditTool exists because notebooks need structure-aware edits rather than line-oriented patching. The public source confirms the tool is first-class, but implementation details beyond that are tool-local.
Embedded search optimization
When embedded search tools are available in the Bun binary,GlobTool and GrepTool are removed from the exposed tool list. The comment in src/tools.ts states that Claude’s shell aliases can replace those dedicated tools in that build.
That means search behavior can differ between builds even when the high-level user experience looks similar.
Practical reading model
The file workflow is designed around three goals:- avoid loading irrelevant files into context
- make writes explicit and auditable
- keep search cheap compared with model context