MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getDescription

Function getDescription

src/tools/GrepTool/prompt.ts:6–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4export const GREP_TOOL_NAME = 'Grep'
5
6export function getDescription(): string {
7 return `A powerful search tool built on ripgrep
8
9 Usage:
10 - ALWAYS use ${GREP_TOOL_NAME} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${BASH_TOOL_NAME} command. The ${GREP_TOOL_NAME} tool has been optimized for correct permissions and access.
11 - Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
12 - Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
13 - Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
14 - Use ${AGENT_TOOL_NAME} tool for open-ended searches requiring multiple rounds
15 - Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
16 - Multiline matching: By default patterns match within single lines only. For cross-line patterns like \`struct \\{[\\s\\S]*?field\`, use \`multiline: true\`
17`
18}
19

Callers 2

descriptionFunction · 0.85
promptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected