1# Tools
2
3Zed's built-in agent has access to a variety of tools that allow it to interact with your codebase and perform tasks.
4
5## Read & Search Tools
6
7### `diagnostics`
8
9Gets errors and warnings for either a specific file or the entire project.
10
11When a path is provided, shows all diagnostics for that specific file.
12When no path is provided, shows a summary of error and warning counts for all files in the project.
13
14### `fetch`
15
16Fetches a URL and returns the content as Markdown. Useful for providing docs as context.
17
18### `find_path`
19
20Quickly finds files by matching glob patterns (like "\*_/_.js"), returning matching file paths alphabetically.
21
22### `grep`
23
24Searches file contents across the project using regular expressions, preferred for finding symbols in code without knowing exact file paths.
25
26### `list_directory`
27
28Lists files and directories in a given path, providing an overview of filesystem contents.
29
30### `now`
31
32Returns the current date and time.
33
34### `open`
35
36Opens a file or URL with the default application associated with it on the user's operating system.
37
38### `read_file`
39
40Reads the content of a specified file in the project.
41
42This tool supports two primary ways of reading text:
43
44- **Line range mode** (best when you already have line numbers, e.g. from an outline):
45 - Provide `start_line` and/or `end_line` (1-based, inclusive end).
46- **Byte window mode** (best for paging efficiently and avoiding repeated small reads):
47 - Provide `start_byte` (0-based) and/or `max_bytes`.
48 - The returned content is **rounded to whole line boundaries** so it doesn’t start or end mid-line.
49
50For large files, calling `read_file` without a range may return a **file outline** with line numbers instead of full content. To read large files efficiently without line-number paging, use **byte window mode**.
51
52#### Byte window paging recommendations
53
54- Prefer setting a larger `max_bytes` when you expect to read multiple adjacent sections, to reduce tool calls and avoid rate limiting.
55- Use `start_byte` to page forward/backward deterministically.
56
57When using byte window mode, the output includes a small header describing the effective returned window (requested/rounded/returned byte ranges and line ranges). Use the returned byte range to pick the next `start_byte` for continued paging.
58
59### `thinking`
60
61Allows the Agent to work through problems, brainstorm ideas, or plan without executing actions, useful for complex problem-solving.
62
63### `web_search`
64
65Searches the web for information, providing results with snippets and links from relevant web pages, useful for accessing real-time information.
66
67## Edit Tools
68
69### `copy_path`
70
71Copies a file or directory recursively in the project, more efficient than manually reading and writing files when duplicating content.
72
73### `create_directory`
74
75Creates a new directory at the specified path within the project, creating all necessary parent directories (similar to `mkdir -p`).
76
77### `delete_path`
78
79Deletes a file or directory (including contents recursively) at the specified path and confirms the deletion.
80
81### `edit_file`
82
83Edits files by replacing specific text with new content.
84
85### `move_path`
86
87Moves or renames a file or directory in the project, performing a rename if only the filename differs.
88
89### `terminal`
90
91Executes shell commands and returns the combined output, creating a new shell process for each invocation.