search
Locate code symbols, run AST/DSL queries, batch text patterns, trace call graphs, and perform semantic lookup across a codebase from one action-based MCP tool.
Instructions
Code-intelligence (codegraph-compatible) search facade. Covers codegraph_symbol_search (BM25), codegraph_query (tree-sitter AST), codegraph_query chain DSL, and ripgrep/fd text search in one tool. Pick a capability via action:
action=symbol — BM25 FTS lookup of a symbol by name (fast 'where is X defined', codegraph_symbol_search equivalent). Params: query, language, kind, limit.
action=query — tree-sitter .scm query DSL (semantic AST match, NOT the same as symbol). Params: query_key, query_string, filter, file_path.
action=batch — run multiple ripgrep searches in one call. Params: queries (required array of 2-10 items; each item requires
patternand may include roots/include_globs/exclude_globs/max_results/label), output_format.action=chain — jQuery-style codegraph chain DSL: compose search / explore / callers / callees in one process. Steps are separated by '.' (NOT '|'), e.g. query="search('IndexShard').callers()" or "explore('parse').related()"; a plain string with no parentheses is treated as explore(string).related(). Params: query (required — the chain string), max_symbols, max_files, include_code, compact.
action=select — Hyphae DSL, a CSS-selector-style graph query (RFC-0003). ONE selector replaces chains of navigate/callers/search: #name, .kind (.function/.method/.class), *, :calls(#X), :callees(#X), :not(sel), :in(path), [file=p]/[language=l]/[class=C], combinators A > B / A B. Example: '.function:calls(#IndexShard):in(server/)'. Params: selector (required), max_results, output_format.
action=subscribe — RFC-0001 reactive push: subscribe to a Hyphae selector. Receive send_resource_updated when results change; re-read resource_uri. Returns { sub_id, resource_uri }. Params: selector (required), min_interval.
action=unsubscribe — cancel a Hyphae subscription. Params: sub_id or selector.
action=tql_schema — full TQL (extended Hyphae) DSL reference: temporal pseudo-classes (:hot/:stale/:hotspot), depth quantifier {n,m}, :violates, :reaches, :branch, plus all standard Hyphae pseudo-classes. Call once at session start. Params: (none).
action=tql_execute — execute a TQL (Temporal Query Language) selector: Hyphae extended with DepthQuantifier {n,m} bounded BFS, temporal pseudo-classes, reachability, architecture violations, and branch context. Call action=tql_schema first for the grammar. Params: selector (required), max_results.
action=semantic — find symbols semantically similar to a natural-language query via vector embeddings (requires numpy + embedding pipeline). Params: query (required), top_k, min_similarity, language, kind, use_combined_score.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Symbol kind filter for action=symbol (default: any). | |
| mode | No | Action sub-mode (e.g. summary|cycles). | |
| limit | No | Max results. | |
| query | No | Search query/pattern. | |
| scope | No | Action discriminator (e.g. point|graph). | |
| action | Yes | Which capability to invoke. One of: batch, chain, query, select, semantic, subscribe, symbol, tql_execute, tql_schema, unsubscribe | |
| symbol | No | Symbol/function name. | |
| language | No | Language hint (usually auto). | |
| file_path | No | Target file path. | |
| function_name | No | Function name (alias of symbol). | |
| output_format | No | Output format: JSON. |