Grep across projects
grepSearch one or many Overleaf projects for exact text or regex patterns, returning file:line matches with optional context from auto-refreshed local snapshots.
Instructions
Exact text or regex search (ripgrep) across one or many projects, with file:line results and optional context. Uses local snapshots that refresh automatically when Overleaf reports changes. For topic-style questions use "search" instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "grep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to find, or a regex when regex is true | |
| regex | No | Treat query as a regular expression (default false: plain text) | |
| exclude | No | Glob patterns of files to skip, e.g. ["*.bib"] | |
| include | No | Glob patterns of files to search, e.g. ["*.tex"] or ["chapters/**"] | |
| refresh | No | Re-download the projects before searching | |
| projects | No | Projects to cover: a list of names/ids, or "all". Defaults to the pinned projects, or the 25 most recently updated if none are pinned. | |
| wholeWord | No | Only match whole words (default false) | |
| maxResults | No | Most matches to return (default 100) | |
| contextLines | No | Lines of context around each match (default 1) | |
| caseSensitive | No | Default: smart case (case-insensitive unless the query has capitals) |