ollie/data/tools/file_grep.meta

62 lines
2.1 KiB
Plaintext

{
"description": "Search file contents with ripgrep. Capped at 50 matches by default.",
"prompt": "## file_grep\n\nSearch file contents with ripgrep. Capped at 50 matches by default.\n\n**Args**: `pattern` (required), plus optional named params.\n\n```\nfile_grep(pattern=\"pattern\", path=\"/abs/dir\")\nfile_grep(pattern=\"TODO\", path=\"src/\", glob=\"*.go\", case_insensitive=true)\nfile_grep(pattern=\"func main\", path=\"/home/user/project\")\n```\n\n- `path`: search directory (not a positional arg)\n- `glob`: file glob filter\n- `case_insensitive`: boolean\n\n**Params**: `path`, `mode` (content|files_with_matches|count), `glob`, `type`, `case_insensitive`, `before`, `after`, `context`, `multiline`, `head`, `offset`.",
"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"
},
"after": {
"type": "integer",
"description": "Lines after match (-A)"
},
"before": {
"type": "integer",
"description": "Lines before match (-B)"
},
"context": {
"type": "integer",
"description": "Lines around match (-C)"
},
"multiline": {
"type": "boolean",
"description": "Enable multiline matching"
},
"head": {
"type": "integer",
"description": "Max results to return (default: 50)"
},
"offset": {
"type": "integer",
"description": "Skip first N results"
}
}
},
"scope": "read"
}