Skip to main content
File tools give Claude the ability to read and modify any file in your codebase. Every file operation requires your permission on first use unless you’ve set a permissive mode.

FileReadTool

Reads the contents of a file. Supports plain text, source code, images, PDFs, and Jupyter notebooks. Usage pattern:
Supported formats:
  • Plain text and source code (any extension)
  • Images (PNG, JPG, GIF, WebP)
  • PDFs
  • Jupyter notebooks (.ipynb)

FileWriteTool

Creates a new file or overwrites an existing one with complete content. Usage pattern:
FileWriteTool overwrites the entire file. For partial edits, use FileEditTool instead.

FileEditTool

Performs a precise string replacement within a file — replaces an exact oldString with a newString. This is the primary tool for modifying existing code. Usage pattern:
How it works:
  1. Claude reads the target file
  2. Identifies the exact string to replace
  3. Substitutes it with the new content
  4. The replacement must be unique — if the string appears multiple times, Claude uses enough surrounding context to identify the correct instance
FileEditTool is preferred over FileWriteTool for changes to existing files because it preserves surrounding code and is easier to review.

GlobTool

Searches for files matching a glob pattern. Returns matching paths sorted by modification time. Usage pattern:
Example patterns:

NotebookEditTool

Reads and edits Jupyter notebook (.ipynb) files, operating at the cell level. Usage pattern:
All file operations are logged in the session. Use /diff to review all changes Claude has made before committing.