Search module files
searchFind regex patterns in an installed module's TypeScript, JavaScript, style, and Markdown files, returning matching code snippets with adjustable context.
Instructions
Search for pattern in module's .d.ts/.ts/.tsx/.jsx/.css/.scss/.sass/.less/.md files with code snippets
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": {
"module": "<module>",
"pattern": "<pattern>"
},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Project root directory (defaults to cwd) | |
| flags | No | Regex flags (e.g. 'i' for case-insensitive) | |
| limit | No | Max results | |
| module | Yes | Module name (exact or substring match) | |
| context | No | Lines of context around match | |
| pattern | Yes | Regex pattern to search |