Files, Search, and Memory
These tools read, write, and search files, and they store memory notes.
Use Read before Edit, because Edit replaces an exact string in a file.
For example, Grep with output_mode set to files_with_matches lists only the files that match.
The Yes and No columns are explained on Tools.
You can also read or edit files yourself and let Claude see the result. Deny the tool name in permissions.deny, or leave it out of a subagent tools list, to turn a tool off. The memory tools need a server-side flag.
Tools
Source: Tools Reference, Configure Permissions, and the program (the tool input schemas).
| Tool | Status | What It Does | How It Works | Available In | Read-Only | Parallel | Deferred |
|---|---|---|---|---|---|---|---|
Read | Documented | Reads files, images, PDFs, and notebooks. | See Read Parameters. | Main session and subagents. Kept in background subagents. | ✅ | ✅ | ❌ |
Write | Documented | Creates or overwrites a file. | file_ (string, required, absolute), content (string, required), machine (optional). A deny rule wins. | Main session and subagents. Kept in background subagents. | ❌ | ❌ | ❌ |
Edit | Documented | Replaces an exact string in a file. | file_ (required), old_ (required), new_ (required, must differ), replace_ (boolean, default false), machine (optional). | Main session and subagents. Kept in background subagents. | ❌ | ❌ | ❌ |
Notebook | Documented | Edits a cell of a Jupyter notebook. | See NotebookEdit Parameters. | Main session and subagents. Kept in background subagents. | ❌ | ❌ | ✅ |
Glob | Documented | Finds files by glob pattern. | pattern (string, required), path (string, optional, directory), machine (optional). | Main session and subagents. The docs say a subagent can get Glob and Grep when the main session lacks them (macOS, Linux, WSL). | ✅ | ✅ | ❌ |
Grep | Documented | Searches file contents with ripgrep. | See Grep Parameters. | Same as Glob. | ✅ | ✅ | ❌ |
LSP | Documented | Code intelligence: definitions, references, symbols, hover, call hierarchy. | operation, file (required), line (int, 1 or more, required), character (int, 1 or more, required), query (optional, workspace only). | Main session and subagents. Background subagents keep it since 2.. | ✅ | ✅ | ✅ |
memory_ | Undocumented Gated | Reads a document from a memory store. | store (string, required), path (string, required). | ❓ | ✅ | ✅ | ❌ |
memory_ | Undocumented Gated | Saves a document to a memory store. | store, path, content (all strings, required; content replaces the whole document), if_ (string, max 64, version token for compare-and-set). | ❓ | ❌ | ❌ | ❌ |
memory_ | Undocumented Gated | Lists memory stores and their documents. | store (optional), path_ (optional, directory-aligned), cursor (optional). | ❓ | ✅ | ✅ | ❌ |
Read Parameters
| Parameter | What It Does | Required |
|---|---|---|
file_ | Absolute path of the file. | ✅ |
offset | Line to start from, 0 or more. | ❌ |
limit | Number of lines to read, more than 0. | ❌ |
pages | PDF page range such as 1-, at most 20 pages at a time. | ❌ |
allow_ | Reads a file or range over the usual size limits, as far as the context allows. | ❌ |
machine | Name of an attached machine. Offered only when machines are attached. | ❌ |
NotebookEdit Parameters
| Parameter | What It Does | Required |
|---|---|---|
notebook_ | Absolute path of the . file. | ✅ |
new_ | The new source of the cell. | ✅ |
cell_ | Cell to edit. For insert, the new cell goes after it. | ❌ |
cell_ | code or markdown. Required for insert. | ❌ |
edit_ | replace (default), insert, or delete. | ❌ |
Grep Parameters
| Parameter | What It Does | Required |
|---|---|---|
pattern | The regular expression to search for. | ✅ |
path | File or directory to search. | ❌ |
glob | Glob filter such as **/. | ❌ |
output_ | content, files_ (default), or count. | ❌ |
- | Lines before each match. Needs content mode. | ❌ |
- | Lines after each match. Needs content mode. | ❌ |
- | Alias for context. | ❌ |
context | Lines before and after each match. Needs content mode. | ❌ |
- | Shows line numbers. Needs content mode, default true. | ❌ |
- | Case-insensitive search. | ❌ |
- | Prints only the matched parts. Needs content mode. | ❌ |
type | File type such as js, py, or rust. | ❌ |
head_ | Limits the first N entries. Default 250, 0 for no limit. | ❌ |
offset | Skips the first N entries before head_. | ❌ |
multiline | Lets . match newlines and patterns span lines. | ❌ |
machine | Name of an attached machine. Offered only when machines are attached. | ❌ |
Example
Block reads of secret files and all edits to lock files.
.claude/settings.json
{
"permissions": {
"deny": ["Read(./.env)", "Read(./secrets/**)", "Edit(./package-lock.json)"]
}
}
How It Works
machineis an extra optional field that Claude Code adds to a tool schema when an attached-machines feature is on.- File tools check permissions with the rule syntax in Permission Rules.
Read,Glob,Grep,Write, andEditcarryremoteExecutionmetadata in the program. It marks them as runnable on a remote host.Readhas no result size cap, so useoffsetandlimitfor large files.