Skip to content

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.

  • 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
PatternMatches
*.rsAll Rust files in the current directory
**/*.tsAll TypeScript files recursively
src/**/*.tsxAll .tsx files inside src/
**/test_*.pyAll Python test files anywhere

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

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

  • Glob is typically the first step in a multi-tool workflow: Glob → Read or Grep
  • Be specific with patterns to avoid scanning irrelevant directories (e.g., node_modules/)