FeaturesTools
codebase_search
Perform high-context, semantic searches across your project using AI-driven vector embeddings.
codebase_search
The codebase_search utility facilitates semantic exploration. Rather than relying on rigid text matching, it interprets the conceptual intent of your query to locate relevant logic and structures across your entire project history.
[!NOTE] This capability requires an active and synchronized Codebase Index.
Parameters
query(required): A natural language description of your target (e.g., "how is user session persistence implemented?").path(optional): Focus the search on a specific architectural layer (e.g.,lib/security).
The Advantages of Semantic Retrieval
Standard search tools (grep) often fail if you aren't using the exact variable name. codebase_search overcomes this by identifying:
- Conceptual Relationships: Inputting "payment processing" could surface
executeStripeTransaction()andBillingService.js, even if the exact phrase "payment processing" is absent. - Structural Patterns: Locate architectural styles or error-handling strategies that share a similar conceptual signature.
Relevance Scoring
Search results are prioritized using a similarity score (ranging from 0.0 to 1.0). To ensure the highest accuracy, Sypha typically filters for matches with a confidence score above 0.4.
Operational Tips
- Provide Detail: Vague terms like "database" are less effective than "establishing a connection pool to PostgreSQL via TypeORM."
- Limit Context: If you are certain a feature resides in the frontend, providing a
pathparameter like"apps/web"increases both speed and precision.