fast_context_search
Search a codebase using natural language queries. Returns relevant file paths with line ranges and suggested grep keywords for follow-up searches.
Instructions
AI-driven semantic code search using Windsurf's Devstral model. Searches a codebase with natural language and returns relevant file paths with line ranges, plus suggested grep keywords for follow-up searches. Parameter tuning guide:
tree_depth: Controls how much directory structure the remote AI sees before searching. If you get a payload/size error, REDUCE this value. If search results are too shallow (missing files in deep subdirectories), INCREASE this value.
max_turns: Controls how many search-execute-feedback rounds the remote AI gets. If results are incomplete or the AI didn't find enough files, INCREASE this value. If you want a quick rough answer, use 1. Response includes a [config] line showing actual parameters used — use this to decide adjustments on retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language search query (e.g. "where is auth handled", "database connection pool") | |
| project_path | No | Absolute path to project root. Empty = current working directory. | |
| tree_depth | No | Directory tree depth for the initial repo map sent to the remote AI. Default 3. Use 1-2 for huge monorepos (>5000 files) or if you get payload size errors. Use 4-6 for small projects (<200 files) where you want the AI to see deeper structure. Auto falls back to a lower depth if tree output exceeds 250KB. | |
| max_turns | No | Number of search rounds. Each round: remote AI generates search commands → local execution → results sent back. Default 3. Use 1 for quick simple lookups. Use 4-5 for complex queries requiring deep tracing across many files. More rounds = better results but slower and uses more API quota. | |
| max_results | No | Maximum number of files to return. Default 10. Use a smaller value (3-5) for focused queries. Use a larger value (15-30) for broad exploration queries. | |
| exclude_paths | No | Directory/file patterns to exclude from tree and search context. Useful for reducing payload size on large repos. Examples: ['node_modules', 'dist', '.git', 'build', 'coverage', '*.min.*'] |