drupal_search_code
Search custom Drupal code with ripgrep to locate functions, hooks, or patterns. Restrict searches to specific paths, use regex, and cap result counts.
Instructions
Search custom code using ripgrep
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site": "<site>",
"query": "<query>"
},
"name": "drupal_search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | DDEV site name | |
| paths | No | Restrict to paths | |
| query | Yes | Search query | |
| regex | No | Treat as regex | |
| max_results | No | Max results (default 20) |