# Add contents_tool \(\#28738\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b794919842c00662f9376dee0154909b84795f20)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b794919842c00662f9376dee0154909b84795f20

Requested commit: b794919842c00662f9376dee0154909b84795f20

Commit: b794919842c00662f9376dee0154909b84795f20

Tree: f88670fc3e54370a4ee42f8df2343d9f73a15ff3

Author: Richard Feldman

Committer: GitHub

## Message

```
Add contents_tool (#28738)

This is a combination of the "read file" and "list directory contents"
tools as part of a push to reduce our quantity of builtin tools by
combining some of them.

The functionality is all there for this tool, although there's room for
improvement on the visuals side: it currently always shows the same icon
and always says "Read" - so you can't tell at a glance when it's reading
a directory vs an individual file. Changing this will require a change
to the `Tool` trait, which can be in a separate PR. (FYI @danilo-leal!)

<img width="606" alt="Screenshot 2025-04-14 at 11 56 27 PM"
src="https://github.com/user-attachments/assets/bded72af-6476-4469-97c6-2f344629b0e4"
/>

Release Notes:

- Added `contents` tool
```

## Parents

- [fc1252b0cd5ab50d6f206cbf9258bee6738715a7](https://git.cafe/gitcafe/zed/commit/fc1252b0cd5ab50d6f206cbf9258bee6738715a7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b794919842c00662f9376dee0154909b84795f20?format=markdown)
