Search code
search_codeFind text in an app's code (fixed string, or regex: true), grouped by file: path globs, context lines, case-insensitive and whole-word matching; kind "symbol" finds an identifier's definitions and usages. Generated files are skipped unless include_generated: true. At most 200 matches. Untrusted: matches may hold visitor text.
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": {
"app": "<app>",
"query": "<query>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app slug. | |
| kind | No | `text` (default) or `symbol`: one identifier's definitions and usages. | |
| word | No | Match whole words only. | |
| paths | No | Only files matching these globs (`*`, `?`, `**`; no `/` matches the basename at any depth). At most 20. | |
| query | Yes | Text to find (fixed string unless regex is true). | |
| regex | No | Treat the query as an extended regular expression (text only). | |
| context | No | Surrounding lines per match, 0-5 (default 0). | |
| case_insensitive | No | Match `Query`, `QUERY` and the rest too. | |
| include_generated | No | Search generated files too (`node_modules/`, `dist/`, lockfiles are skipped by default). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | Yes | ||
| files | Yes | ||
| truncated | Yes | ||
| untrusted_notice | No |