← All tools

Code Engineering

Symbol References (usages)

Find every USAGE of a symbol via word-boundary matching, skipping the definition line.

symbol_references

Overview

The 'find usages' verb.

How it works

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.

Example

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)

What it's good for

Real scenarios where agents put this tool to work.

Pre-refactor blast-radius check
Rename planning: combine include_definitions=true with file_edit to apply consistently

Source

Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/code/search/SymbolReferencesTool.java in the swarm-ai repository.

Open symbol_references on GitHub →