pub const GREP_TOOL_DESCRIPTION: &str = r#"A powerful search tool built on ripgrep for searching file contents.
Usage:
- Supports full regex syntax (e.g., "log.*Error", "function\s+\w+")
- Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
- Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
- Pattern syntax uses ripgrep - literal braces need escaping
Output Modes:
- "files_with_matches" (default): Returns only file paths that contain matches
- "content": Returns matching lines with optional context
- "count": Returns match count per file
Context Options (only with output_mode: "content"):
- -A: Lines after each match
- -B: Lines before each match
- -C: Lines before and after (context)
- -n: Show line numbers (default: true)
Examples:
- Search for "TODO" in all files: pattern="TODO"
- Search in Rust files only: pattern="impl.*Trait", type="rust"
- Search with context: pattern="error", output_mode="content", -C=3
- Case insensitive: pattern="error", -i=true"#;Expand description
Grep tool description constant.