Search files
search_filesSearch files in a directory by name glob and content regex, returning matching file paths.
Instructions
Walk an allowed directory. namePattern is a glob (* and **). contentPattern is a JavaScript regex matched per line. Symlinks are not followed.
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": {
"path": "<path>"
},
"name": "search_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Directory to search | |
| maxResults | No | ||
| namePattern | No | Glob vs relative path or basename | |
| contentFlags | No | RegExp flags; default i | |
| contentPattern | No | Regex source matched against each line |