find_symbol
Use when the symbol name is known: resolve an exact function, class, or struct against vex's index to retrieve its record, not fuzzy ranked search or grep scan results.
Instructions
Resolve a symbol by exact name (with prefix fallback) against the FST inverted index (~4ms). Prefer over search when the symbol name is known and you want exactly that record back, not a fused-rank list. Prefer over grep for git grep 'class Foo'-style definition lookup — grep scans every byte; this is a constant-time index probe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | DEPRECATED — use `symbol`. Pre-v1.7 alias, still accepted; emits a deprecated_args notice in _meta. | |
| symbol | Yes | Exact symbol name (function/class/struct/etc.) — canonical key (v1.7+). Use search for partial or fuzzy names. | |
| exclude | No | Blacklist results by path glob; wins over include (repeatable) | |
| include | No | Whitelist results by path glob, gitignore syntax (repeatable) | |
| auto_update | No | Auto-update the index if stale, or bootstrap it if missing, before running (default: true) | |
| async_update | No | With auto_update, refresh a stale index in the background instead of waiting for it: results come from the index already on disk and _meta.vex.dev/stale says so (default: false) | |
| project_root | No | Absolute path to the project root (defaults to the MCP working directory) | |
| exclude_tests | No | Drop test files from the results (tests/ dirs, *_test.*, test_*.py, *.spec.ts, __tests__/, tests.rs, ...; same set as tests_for). Composes with include/exclude. Path-based only: Rust unit tests inside a `#[cfg(test)] mod tests` block of a non-test file are not excluded. | |
| no_stale_check | No | Skip the staleness check that runs before each call; assumes the index is fresh. Redundant when `auto_update` is true. |