← All tools

Code Engineering

Symbol Search (definitions)

Find the DEFINITION of a class, function, or method via language-aware regex heuristics.

symbol_search

Overview

The 'go to definition' verb. Pair with symbol_references for 'find usages'.

How it works

READ_ONLY. Default limit 100 hits; per-file 2 MB cap. Skips the standard build/VCS plus venv / .venv / vendor.

Example

When a user asks:

Where is class UserService defined?

the agent calls the tool:

symbol_search(symbol="UserService")

and gets back: src/main/java/.../UserService.java:14 — public class UserService src/test/java/.../UserServiceTest.java:9 — class UserServiceTest

What it's good for

Real scenarios where agents put this tool to work.

Jump-to-definition before editing a class
Find the canonical implementation when multiple files mention the same name

Source

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

Open symbol_search on GitHub →