magento_find_table_usage
Find all code references to a database table across db_schema.xml, setup scripts, raw SQL, and resource models. Builds a cross-module dependency map to analyze the impact of schema changes.
Instructions
Find all code that references a database table — across db_schema.xml, Setup scripts (InstallSchema/UpgradeSchema), raw SQL (Zend_Db_Expr, $connection->query), getTable() calls, and resource model definitions. Builds a cross-module dependency map showing who reads/writes/creates a given table. Essential for impact analysis of schema changes.
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": {
"tableName": "<tableName>"
},
"name": "magento_find_table_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tableName | Yes | Database table name to find all references for. Examples: "salesrule_ordered", "catalog_product_entity", "quote_item" |