Grep across a site's files
search_filesSearch every file of a site for a literal string or a regular expression: the served files by default, or the editable source tree with target 'source'. Use it before reading files in bulk, to find the ones that matter.
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": {
"pattern": "<pattern>"
},
"name": "search_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | File name filter, e.g. '*.js' or '*.{js,html}'. | |
| name | No | Site name as shown by list_sites, e.g. my-portfolio. Provide name or siteId. | |
| regex | No | When true, pattern is an extended regular expression (BusyBox grep -E, no PCRE). Default false: literal match. | |
| siteId | No | Site id from list_sites or get_site. Use instead of name. | |
| target | No | 'dist' (default) searches the served files; 'source' searches the editable source tree (get_site.sourceStored). | |
| pattern | Yes | Text to find (ASCII, max 500 chars). Literal unless regex is true. | |
| maxMatches | No | Cap on returned matches. Default 200, hard max 1000. Truncation is reported via budgetExceeded. | |
| caseInsensitive | No | Ignore upper/lower case. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| siteId | Yes | ||
| target | Yes | ||
| matches | Yes | ||
| totalMatches | Yes | ||
| budgetExceeded | Yes | True if the search hit maxMatches and there are likely more matches not returned. |