# agent: Clarify \`include_pattern\` parameter usage for grep tool \(\#41225\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d4c0b87fb29be189c504ced5c50c41290476e158

Requested commit: d4c0b87fb29be189c504ced5c50c41290476e158

Commit: d4c0b87fb29be189c504ced5c50c41290476e158

Tree: a6c1ae969a1aa8fab22ede8c1770c966d06c2ca8

Author: procr1337

Committer: GitHub

## Message

````
agent: Clarify `include_pattern` parameter usage for grep tool (#41225)

Adds clarifying examples and information about the `include_pattern`
parameter for the grep tool, analogous to the `path` parameter of the
read and list tools and others.

The lack of clarity led to unexpected agent behavior described in
#41189. This change is confirmed to improve the precision of Claude
Sonnet 4.5 when searching for code in an empty conversation (without it,
it leaves out the root directory in the query).

Closes #41189.

```
Release Notes:

- Clarify grep tool description to improve agent precision when using it with the `include_pattern` parameter
```
````

## Parents

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

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