source_search
Find code occurrences by searching project source files with text or regex patterns, scoping results via path, file list, case sensitivity, and maximum matches.
Instructions
Search source files in the project directory.
Args: pattern: text or regex pattern path: directory to search (default: default_project_dir or cwd) files: optional explicit file list (relative to path) regex: treat pattern as a regular expression
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": "source_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| files | No | ||
| regex | No | ||
| pattern | Yes | ||
| ignore_case | No | ||
| max_matches | No |