magento_find_callers
Find all call sites of a PHP method across the codebase, searching for method patterns in PHP files and XML configs. Trace data flow and understand where a method is used.
Instructions
Find all call sites of a PHP method across the codebase. Searches for ->method() and ::method() patterns in PHP files and method references in XML config files. Use this to understand where a method is used and trace data flow.
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": {
"methodName": "<methodName>"
},
"name": "magento_find_callers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| className | No | Optional: class that owns the method — narrows results to files that reference this class. Examples: "SalesRuleManagement", "CartRepository" | |
| methodName | Yes | Method name to find callers for. Examples: "execute", "save", "collectTotals", "copySalesRuleIdsFromParentToChildQuote" |