search
Find code by symbol name, AST pattern, text regex, or graph selector. Supports batch and chain operations.
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=content — ripgrep text/regex search across files. Params: query, roots, include_globs, ...
action=grep — two-stage fd (file discovery) + ripgrep search. Params: query, roots, ...
action=batch — run multiple search queries in one call. Params: queries.
action=chain — jQuery-style codegraph chain DSL: compose search → explore → callers → callees in one process. Params: chain/program, default_limit, include_source.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which capability to invoke. One of: batch, chain, content, grep, query, select, subscribe, symbol, unsubscribe | |
| scope | No | Action discriminator (e.g. point|graph). | |
| mode | No | Action sub-mode (e.g. summary|cycles). | |
| file_path | No | Target file path. | |
| symbol | No | Symbol/function name. | |
| function_name | No | Function name (alias of symbol). | |
| query | No | Search query/pattern. | |
| language | No | Language hint (usually auto). | |
| limit | No | Max results. | |
| output_format | No | Output format (toon|json). |