Table relationships
table_relationshipsTrace foreign keys in both directions up to a configurable depth to reveal join paths between tables, eliminating guesswork from column names.
Instructions
Follow foreign keys from one table, in both directions, up to a given depth. Outbound keys tell you what a row points at; inbound keys tell you what points at it. Use this to work out how to join instead of guessing from column names.
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": {
"schema": "<schema>",
"table": "<table>"
},
"name": "table_relationships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | How many foreign key hops to follow. Defaults to 2. | |
| table | Yes | Table name, unqualified. | |
| schema | Yes | Schema name. |