Search files
fs_searchSearch the project's code for a regular expression (ripgrep, case-smart). Returns matching lines with file and line number (about 100 characters either side of a match in a long line), as many whole matches as fit one answer; when there are more it says the offset to continue from. Dependency and build directories are skipped. env production searches the live site's files, read-only.
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": {
"project": "<project>",
"pattern": "<pattern>"
},
"name": "fs_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | preview (default), or production: the live site's files, read-only (its code as published plus its own /data), for the project's owner and editors. | preview |
| glob | No | Only files matching this glob, e.g. "*.ts". | |
| path | No | Directory to search, e.g. "workspace/src". | workspace |
| offset | No | Skip this many matches: the offset a previous search said to continue from. | |
| pattern | Yes | ||
| project | Yes | Project slug or id. |