Skip to main content
Search tools let Claude navigate large codebases efficiently using pattern matching and content search.

GlobTool

Finds files matching a glob pattern. Returns paths sorted by modification time — most recently modified first. Usage pattern:
Common patterns:

GrepTool

Searches file contents using regular expressions, powered by ripgrep. Returns file paths and line numbers for all matches, sorted by modification time. Usage pattern:
Real-world examples:
Regex support: GrepTool supports full regex syntax:
GrepTool searches file contents. Use GlobTool to find files by name pattern, and GrepTool to find files by content.

ToolSearchTool

Deferred tool discovery — searches for available tools (including MCP tools) that match a description. Used internally when Claude needs a capability it doesn’t have loaded yet. This tool runs automatically in the background; you don’t invoke it directly.
For large codebases, Claude often combines GlobTool (to find relevant files) and GrepTool (to find specific patterns within them) in sequence to efficiently locate code without reading every file.