Beamscope.MCP.Tools.SearchCode (Beamscope v0.1.2)

Copy Markdown View Source

MCP tool: searches a repo for a natural-language or exact-name query, returning two separate result lists — exact_matches (a literal grep for identifier-like terms in the query, works with no extra dependencies) and semantic_matches (embedding search over the repo's chunks, requires the optional bumblebee/nx/torchx deps — see Beamscope.Embeddings). They're kept separate rather than blended into one ranking, since an exact match and a similarity score aren't the same kind of signal — grep reliably wins on exact-name queries where semantic search is only probabilistic. If the ML deps aren't installed, semantic_matches is empty and semantic_search_unavailable explains why, but exact_matches still works.