search_code
Search for specific patterns or regular expressions within code files across a specified directory. Use file patterns like *.py or *.js to narrow results and locate relevant code snippets efficiently.
Instructions
Search for patterns in code
Input Schema
Name | Required | Description | Default |
---|---|---|---|
file_pattern | No | File pattern (e.g., *.py, *.js) | |
path | Yes | Directory to search in | |
query | Yes | Search query or regex | |
regex | No | Use regex search |
Input Schema (JSON Schema)
{
"properties": {
"file_pattern": {
"description": "File pattern (e.g., *.py, *.js)",
"type": "string"
},
"path": {
"description": "Directory to search in",
"type": "string"
},
"query": {
"description": "Search query or regex",
"type": "string"
},
"regex": {
"description": "Use regex search",
"type": "boolean"
}
},
"required": [
"query",
"path"
],
"type": "object"
}