{ "description": "Search file contents with a regular expression.", "prompt": "## file_grep\n\nSearch file contents with a regular expression.\n\n**Args**: `pattern` (required), plus optional named params.\n\n```\nfile_grep(pattern=\"pattern\", path=\"\")\nfile_grep(pattern=\"TODO\", path=\"\", glob=\"*.go\", case_insensitive=true)\n```\n\n- `path`: absolute search directory. Defaults to cwd.\n- `glob`: file glob filter.\n- `case_insensitive`: boolean.\n- `multiline`: boolean. When true, the regex can match across line breaks; content results show the match and its starting line.\n- `mode`: `content` (default), `files_with_matches`, or `count`.\n- `head`: maximum results to return (default: 50).\n- `offset`: number of results to skip.", "args": { "type": "object", "required": [ "pattern" ], "properties": { "pattern": { "type": "string", "description": "Regex pattern to search" }, "path": { "type": "string", "description": "Search directory (default: cwd)" }, "mode": { "type": "string", "description": "content|files_with_matches|count (default: content)" }, "glob": { "type": "string", "description": "File glob filter" }, "type": { "type": "string", "description": "File type filter (rg --type)" }, "case_insensitive": { "type": "boolean", "description": "Case-insensitive search" }, "multiline": { "type": "boolean", "description": "Allow matches to span multiple lines" }, "head": { "type": "integer", "description": "Max results to return (default: 50)" }, "offset": { "type": "integer", "description": "Skip first N results" } } }, "scope": "read" }