Search

search_code

Search workspace symbols, component render sites, prop usages, or literal text in-process.

search_code runs completely in-process (no external rg or subprocess spawning required) and returns symbolId and hash-verified sourceRef handles ready to pass into inspect_file, query_graph, or read_slice.

Parameters

ParameterTypeDefaultDescription
querystring (required)—Symbol name, component name, prop/event name, or literal text.
kind'symbol' | 'component_usage' | 'prop_usage' | 'text''symbol'Search mode.
symbol_kindsstring[]—Filter for kind: "symbol" (e.g. ['component', 'store', 'composable', 'function']).
packagestring—Restrict search to one monorepo package.
path_prefixstring—Optional relative directory prefix filter.
limitinteger (1..500)30Maximum matches returned per page.
cursorstring—Pagination cursor (o_<offset>).
rootstringsession rootWorkspace root directory.
format'text' | 'json''text'Output format.
max_bytesinteger (>= 512)16384Maximum UTF-8 response size.

Search Modes

  • symbol: Fast workspace-wide symbol lookup powered by SQLite FTS5 (bm25 ranking).
  • component_usage: Finds where a component is rendered in templates or JSX across packages (handles kebab-case and PascalCase matching).
  • prop_usage: Finds every render site passing a specific prop or event listener.
  • text: Scoped literal text search over indexed frontend files (capped at 500 matches).