Code Engineering
Find every USAGE of a symbol via word-boundary matching, skipping the definition line.
symbol_referencesThe 'find usages' verb.
READ_ONLY. Default 200 hits, 2 MB per-file cap. Scans common source extensions by default; pass lang=java (etc.) to scope to one language. Skips build/VCS + venv/.venv/vendor.
When a user asks:
Find every place we call ChatClient — outside the definition.
the agent calls the tool:
symbol_references(symbol="ChatClient", lang="java")and gets back: 12 references across 7 files (excludes definition at .../client/ChatClient.java:8)
Real scenarios where agents put this tool to work.
Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/code/search/SymbolReferencesTool.java in the swarm-ai repository.