Glob
The Glob tool discovers files on your local filesystem using glob patterns. It is the starting point for codebase exploration and file-based analysis.
What It Does
Section titled “What It Does”- Finds files matching a glob pattern (e.g.,
**/*.rs,src/**/*.ts) - Returns a list of matching file paths
- Supports recursive search and standard glob wildcards
Glob Pattern Syntax
Section titled “Glob Pattern Syntax”| Pattern | Matches |
|---|---|
*.rs | All Rust files in the current directory |
**/*.ts | All TypeScript files recursively |
src/**/*.tsx | All .tsx files inside src/ |
**/test_*.py | All Python test files anywhere |
When It’s Used
Section titled “When It’s Used”The AI uses Glob when:
- You ask it to analyze or summarize a project
- It needs to find all files of a specific type
- It’s building a map of the codebase before diving into details
Example
Section titled “Example”“Give me an overview of this project’s structure.”
The AI will use Glob to discover all source files, group them by type and directory, then produce a structured summary of the architecture.