pub const GREP_ABSOLUTE: &str = "Fast content search tool built on ripgrep. Works with any codebase size.\n\n- Searches file contents using regular expressions\n- Supports full regex syntax (e.g., \"log.*Error\", \"function\\\\s+\\\\w+\")\n- Filter files by pattern with the `include` parameter (e.g., \"*.rs\", \"*.{ts,tsx}\")\n- Returns file paths, line numbers, and matching content sorted by modification time (newest first)\n- Use this tool when you need to find files containing specific patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n\nIMPORTANT: ALWAYS use Grep for search tasks. NEVER invoke `grep` or `rg` as a Bash command. The Grep tool has been optimized for correct permissions and access.\n\n### Parameters\n\n- `pattern`: Regex pattern to search for in file contents (required)\n- `path`: Absolute directory path to search in (required)\n- `include`: Optional file glob filter (e.g., \"*.rs\", \"*.{ts,tsx}\")\n- `limit`: Maximum number of matches to return (default: 100, max: 2000)\n\n### Pattern Syntax Notes (ripgrep-based)\n\n- Literal braces need escaping: use `interface\\\\{\\\\}` to find `interface{}` in Go code\n- Use `\\\\b` for word boundaries: `\\\\bfoo\\\\b` matches \"foo\" but not \"foobar\"\n- Use `\\\\s` for whitespace, `\\\\w` for word characters\n- Use `.*` for any characters: `error.*failed` matches \"error: connection failed\"\n- Use `|` for alternation: `TODO|FIXME` matches either\n- Patterns match within single lines only; multiline patterns are not supported\n\n### When to Use This Tool\n\n- Finding function definitions: `fn\\\\s+process_`\n- Finding usages of a variable or function: `\\\\bmy_function\\\\(`\n- Finding TODO comments: `TODO|FIXME|HACK`\n- Finding error messages: `error.*failed`\n- Finding imports: `^use\\\\s+`\n\n### When NOT to Use This Tool\n\n- Finding files by name - use Glob instead\n- Reading entire file contents - use Read instead\n- Complex multi-step research - use Task tool instead\n\n### Examples\n\nFind all function definitions:\n```\npattern: \"fn\\\\s+\\\\w+\"\npath: \"/home/user/project\"\ninclude: \"*.rs\"\n```\n\nFind TODO comments:\n```\npattern: \"TODO|FIXME\"\npath: \"/home/user/project\"\n```\n\nFind usage of a specific function:\n```\npattern: \"\\\\bprocess_request\\\\(\"\npath: \"/home/user/project/src\"\n```\n\nFind error handling patterns:\n```\npattern: \"Err\\\\(|Error::\"\npath: \"/home/user/project\"\ninclude: \"*.rs\"\nlimit: 50\n```\n\n### Best Practices\n\n1. You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.\n2. Use the `include` parameter to narrow searches to relevant file types\n3. Use word boundaries (`\\\\b`) to avoid partial matches\n4. Escape special regex characters when searching for literal text\n5. Start with broader patterns and refine based on results\n6. Use `limit` parameter if you expect many matches but only need a sample\n";Expand description
Grep tool context for absolute path mode.