get_all_table_references
Extract all table and CTE references from any SQL statement. Specify the SQL dialect for accurate parsing.
Instructions
Extract table and CTE names from SQL statement
Args:
sql: SQL statement to analyze
dialect: Optional SQL dialect (e.g., 'mysql', 'postgres')
Returns:
JSON object containing tables with catalog, database, and alias attributes
CTEs are returned as "cte" type
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": {
"sql": "<sql>"
},
"name": "get_all_table_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| dialect | No |