Claude Code’s built-in tools have distinct, non-overlapping responsibilities. Grep searches content. Glob searches paths. Read loads files. Edit makes targeted changes. Write creates or overwrites files. Bash executes commands. Knowing which tool does what prevents the most common misuse.
The tool map
| Need | Tool | NOT this tool |
|---|---|---|
| Find function calls across codebase | Grep | Not Glob (paths only) |
| Find files by name pattern | Glob | Not Grep (content only) |
| Load a specific file | Read | Not Bash with cat |
| Targeted text replacement | Edit | Not Write (overwrites entire file) |
| Create new file | Write | Not Edit (needs existing file) |
| Run tests, install packages | Bash | Not after trying built-in tools first |
The Grep/Glob confusion
This is the single most tested distinction. Grep = file contents (what’s inside). Glob = file paths (what files exist). “Find all files calling processPayment” → Grep. “Find all .test.tsx files” → Glob.
The standard exploration workflow
- Grep for key patterns (entry points, function names, imports) to find relevant files
- Read specific files identified by Grep to understand the code
- Glob to find related files by naming pattern when needed
This is more efficient than reading every file — Grep narrows the field before Read loads specific content.
Bash as escape hatch
Bash handles everything the specialized tools can’t: running tests, git operations, package management, build commands. But prefer specialized tools when they fit — Grep over bash grep, Read over bash cat, Glob over bash find. Specialized tools provide better integration and context management.
One-liner: Grep searches contents, Glob searches paths, Read loads files, Edit targets replacements, Write creates/overwrites, Bash is the escape hatch — the Grep/Glob confusion is the most common misuse.