Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "hooks": {
- "PreToolUse": [
- {
- "matcher": "Grep",
- "hooks": [
- {
- "type": "prompt",
- "prompt": "Evaluate if this Grep call is searching for code symbols (class names, method names, function references, variable usages, interface implementations, type hierarchies) in Java/Kotlin/code files. If YES, return: {\"decision\": \"block\", \"systemMessage\": \"BLOCKED: Use JetBrains MCP tools for semantic code navigation instead of Grep. Available tools: ide_find_references (find usages), ide_find_definition (go-to-definition), ide_find_symbol (find by name), ide_find_implementations (interface/abstract implementations), ide_type_hierarchy (class relationships), ide_refactor_rename (safe renames), ide_diagnostics (code problems). These provide accurate semantic understanding vs text-based search.\"}. If searching for configuration values, text content, log patterns, or non-code patterns, return: {\"decision\": \"allow\"}.",
- "timeout": 15
- }
- ]
- },
- {
- "matcher": "mcp__jetbrains-index__.*",
- "hooks": [
- {
- "type": "command",
- "command": "powershell -Command \"Write-Host 'JetBrains MCP tool used - semantic code navigation engaged.' -ForegroundColor Green\""
- }
- ]
- }
- ]
- }
- }
Add Comment
Please, Sign In to add comment