Code Engineering
List files matching a glob pattern (e.g. '**/*.java', 'src/**/*Service.java'), most-recently-modified first.
glob_filesThe 'find' verb of the coding toolkit.
READ_ONLY. Skips common build-output / VCS directories (.git, .svn, node_modules, target, build, dist, .gradle, .mvn, .idea, .vscode, __pycache__, .swarmcode). Includes a `**/X → X` fallback matcher so root-level files match the same way the agent expects (works around a Java NIO PathMatcher quirk).
When a user asks:
Find every *Service.java in the src tree.
the agent calls the tool:
glob_files(pattern="src/**/*Service.java")and gets back: src/main/java/.../UserService.java (mod 2026-05-18) src/main/java/.../OrderService.java (mod 2026-05-14) ... 14 more
Real scenarios where agents put this tool to work.
Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/code/search/GlobFilesTool.java in the swarm-ai repository.