puppygraph_check_join
Check whether a column references another table: sample distinct values, count matches, and rank candidate key columns by hit rate.
Instructions
Check from the data whether a column references another table: samples distinct values of from.column and counts how many exist in to.column. Without to.column, tries the type-compatible columns of to.table and ranks them. Returns candidates with hit_rate (share of sampled values found), from_keys and to_keys (distinct counts), and up to 5 values that were not found (unless the server returns counts only). Check every edge this way before putting it in a schema; never present a join you did not check as verified. A hit_rate near 1.0 is a foreign key; below about 0.95 it is a soft reference, so tell the user the evidence. Independent checks can run in parallel. It can take minutes on large tables.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "puppygraph_check_join"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The referenced table and, if known, its key column, e.g. customers.id | |
| from | Yes | The referencing column, e.g. orders.customer_id | |
| max_candidates | No | Without to.column: how many candidate columns to return, default 5 |