search_code
Search source files for a case-insensitive text substring to find where code is defined or used. Get matching file paths, line numbers, and text snippets.
Instructions
Searches for a plain-text substring across readable project files.
Case-insensitive. Returns matching locations as {project, path, line, text}. Use it to locate where something is defined or used without having to open files one by one.
Args: query: Text to look for, e.g. "SecurityLevel" or "def safe_resolve". project: Optional - restrict the search to a single project. max_results: Cap on the number of matches returned.
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": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| project | No | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |