glob
Discover files using pattern matching and show each file's cache status. Use before batch reads, searches, or greps to find candidate files or inspect cache coverage.
Instructions
Discover files by glob and show whether each one is already cached.
Use this before batch_read, search, similar, or grep when you need
candidate files or want to inspect cache coverage.
Routing rules:
Use
globto discover paths.Use
batch_readto seed or read them.Use
cached_only=truewhen you want to know what search/grep can already see without more reads.
Usage guidance:
Keep patterns specific.
Avoid broad patterns like
**/*unless truly necessary.Matches can be fed directly into
batch_read.
Args: pattern: Glob pattern to expand. directory: Base directory for the glob. cached_only: Restrict results to already cached files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| directory | No | . | |
| cached_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | ||
| pattern | No | ||
| directory | No | ||
| matches | No | ||
| total_matches | No | ||
| cached_count | No | ||
| total_cached_tokens | No |