Code Intelligence
basemind pre-indexes your codebase using tree-sitter, mapping symbols, calls, and imports across 300+ languages. Structural queries resolve in milliseconds and return paths, line numbers, and signatures — not file bodies — so they cost a fraction of the tokens of reading source.
Core tools
Section titled “Core tools”outline
Section titled “outline”Get a file’s complete structure: symbols, signatures, line numbers, and doc comments. Add
l2: true to include call sites and embedded documentation.
{ "path": "src/scanner.rs", "l2": true}Returns a table of contents you can scan in seconds instead of reading a thousand-line file. Once you have the exact span, read only that range.
search_symbols
Section titled “search_symbols”Find symbols by substring across all indexed files. Optionally filter by kind
(function, class, type, etc.).
{ "needle": "process_file", "kind": "function"}Returns path:line:column and signature for each match. No scope resolution — a substring
match is exact.
find_references
Section titled “find_references”Find all call sites of any callee whose identifier matches name. No scope resolution
— Foo::bar() and bar() both match name="bar".
{ "name": "spawn", "limit": 50}Backed by an indexed call-site table, returns tens of thousands of hits capped by limit
(default 100, max 1000).
find_callers
Section titled “find_callers”Find callers of a specific definition (path + name + optional kind). First resolves the definition, then returns all callers of that exact symbol.
{ "path": "src/scanner.rs", "name": "process_file", "kind": "function"}Combines definition resolution with the same name-based scan as find_references, so
results are disambiguated by location.
goto_definition
Section titled “goto_definition”Resolve a path:line:column reference to its actual definition. Intra-file resolution
via tree-sitter locals across 80+ languages; JavaScript/TypeScript additionally get
cross-file resolution via oxc scope analysis with --features code-intel-js.
{ "path": "src/main.rs", "line": 42, "column": 10}call_graph
Section titled “call_graph”Walk the call chain up or down from a function, bounded by max_depth and max_nodes.
BFS traversal over the indexed call edges.
{ "name": "query_symbol", "direction": "down", "max_depth": 3}find_implementations
Section titled “find_implementations”Types that implement or inherit from a given name. Rust impl blocks, Python class
inheritance, TypeScript/JavaScript class declarations.
{ "name": "Iterator"}workspace_grep
Section titled “workspace_grep”Pattern search (regex) over file contents, backed by the in-RAM index. Returns capped, structured hits with path, line, and matching text.
{ "pattern": "TODO:.*urgent", "language": "rust", "path_contains": "src"}Faster than shelling out to ripgrep when you already have the index in memory.
Supporting tools
Section titled “Supporting tools”expand
Section titled “expand”Fetch a symbol’s raw source body (the inverse of an outline entry). Use this after an
outline tells you the exact function to fetch.
{ "path": "src/scanner.rs", "name": "process_file"}list_files
Section titled “list_files”Enumerate all indexed files. Filter by language or path_contains.
{ "language": "rust", "path_contains": "src/extract"}dependents
Section titled “dependents”What imports or references a given module. Heuristic reverse-lookup via import statements.
{ "module": "src/store"}status / repo_info
Section titled “status / repo_info”Overview of the indexed repo: file count by language, current branch, HEAD commit, origin URL, on-disk cache size, and index build time.
Discipline
Section titled “Discipline”outlinea file before you open it. A 1000-line file becomes a 30-line table of contents. Then read only the exact span you need.search_symbolsinstead of grep for a definition. Returns indexed symbol names and positions, skipping comment/string noise.find_references/find_callersinstead of grepping call sites. Indexed call edges, not text matches.workspace_grepinstead of shelling out to ripgrep when you genuinely need regex — it runs over the in-RAM index and returns capped, structured results.- Do not re-read a file basemind already mapped. If the outline answered the question, stop.
rescanafter you edit code, not a server reconnect. Passpaths: [...]to limit it.