← All tools

Code Engineering

Glob Files

List files matching a glob pattern (e.g. '**/*.java', 'src/**/*Service.java'), most-recently-modified first.

glob_files

Overview

The 'find' verb of the coding toolkit.

How it works

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).

Example

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

What it's good for

Real scenarios where agents put this tool to work.

Discover the file layout of an unfamiliar repo before grep_search
Find recently-modified files when debugging a regression

Source

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

Open glob_files on GitHub →