Skip to content

Glob

Find files in the workspace matching a glob pattern. Results are sorted newest-first by modification time.

ParamTypeRequiredDefaultNotes
patternstringyesGlob pattern.
pathstringnoworkspace rootSubdirectory to scope the search to.
limitnumberno100Max results to return.

Supports *, ?, [...], and **. Brace expansion and negation are NOT supported — make multiple calls for multi-extension matches.

  • **/*.go — all Go files, any depth
  • src/**/*.ts — TS files under src/
  • *.md — top-level markdown only (basename match when no / in pattern)
  • Always runs with cwd=workspace root, so emitted paths are workspace-relative regardless of the path argument.
  • If path is set, the search is scoped to that subdirectory (path is passed as a positional arg to ripgrep).
  • Uses rg --files --no-require-git --color=never under the hood. The Go-side matcher filters the results (ripgrep’s -g flag is NOT used because it acts as a whitelist that overrides .gitignore).
  • .gitignore is honored whether or not the workspace is a git repo.
  • Results are sorted by mtime descending; ties broken lexicographically.
ConditionResult
Missing patternError result
path outside workspaceError result
path not a directoryError result
No matchesEmpty text result (not an error)
  • Grep — search file content, not just names.
  • Read — pair a Glob to find paths with Reads to inspect them.