1---
2title: AI Agent Tools - Zed
3description: Built-in tools for Zed's AI agent including file editing, code search, terminal commands, web search, and diagnostics.
4---
5
6# Tools
7
8Zed's built-in agent has access to these tools for reading, searching, and editing your codebase.
9
10You can configure permissions for tool actions, including situations where they are automatically approved, automatically denied, or require your confirmation on a case-by-case basis. See [Tool Permissions](./tool-permissions.md) for the list of permission-gated tools and details.
11
12## Read & Search Tools
13
14### `diagnostics`
15
16Gets errors and warnings for either a specific file or the entire project, useful after making edits to determine if further changes are needed.
17When a path is provided, shows all diagnostics for that specific file.
18When no path is provided, shows a summary of error and warning counts for all files in the project.
19
20### `fetch`
21
22Fetches a URL and returns the content as Markdown. Useful for providing docs as context.
23
24### `find_path`
25
26Quickly finds files by matching glob patterns (like "\*_/_.js"), returning matching file paths alphabetically.
27
28### `grep`
29
30Searches file contents across the project using regular expressions, preferred for finding symbols in code without knowing exact file paths.
31
32### `list_directory`
33
34Lists files and directories in a given path, providing an overview of filesystem contents.
35
36### `now`
37
38Returns the current date and time.
39
40### `open`
41
42Opens a file or URL with the default application associated with it on the user's operating system.
43
44### `read_file`
45
46Reads the content of a specified file in the project, allowing access to file contents.
47
48### `thinking`
49
50Allows the Agent to work through problems, brainstorm ideas, or plan without executing actions, useful for complex problem-solving.
51
52### `web_search`
53
54Searches the web for information, providing results with snippets and links from relevant web pages, useful for accessing real-time information.
55
56## Edit Tools
57
58### `copy_path`
59
60Copies a file or directory recursively in the project, more efficient than manually reading and writing files when duplicating content.
61
62### `create_directory`
63
64Creates a new directory at the specified path within the project, creating all necessary parent directories (similar to `mkdir -p`).
65
66### `delete_path`
67
68Deletes a file or directory (including contents recursively) at the specified path and confirms the deletion.
69
70### `edit_file`
71
72Edits files by replacing specific text with new content.
73
74### `move_path`
75
76Moves or renames a file or directory in the project, performing a rename if only the filename differs.
77
78### `restore_file_from_disk`
79
80Discards unsaved changes in open buffers by reloading file contents from disk. Useful for resetting files to their on-disk state before retrying an edit.
81
82### `save_file`
83
84Saves files that have unsaved changes. Used when files need to be saved before further edits can be made.
85
86### `terminal`
87
88Executes shell commands and returns the combined output, creating a new shell process for each invocation.
89
90## Other Tools
91
92### `subagent`
93
94Spawns a subagent with its own context window to perform a delegated task. Useful for running parallel investigations, completing self-contained tasks, or performing research where only the outcome matters. Each subagent has access to the same tools as the parent agent.