Explore the schema · stop 5 of 10
get_join_path
Works out how two tables connect.
Works in read modeTool sets: query · full
You might ask
“How do order items link back to customers?”
Your assistant may call get_join_path to answer.
How it works
- Walks the join graph in the schema index and returns the shortest chain of foreign keys between the two tables.
- The graph includes inferred joins (an
*_idcolumn that matches a primary key) where no foreign key was declared. - Also returns a small Mermaid diagram of the path that clients can draw.
Parameters
fromstringrequired- Start table as "schema.name" (e.g. "public.orders"); a bare name is resolved if unambiguous.
tostringrequired- End table as "schema.name" (e.g. "public.customers"); a bare name is resolved if unambiguous.
What your assistant reads
The description nexql-mcp sends with the tool. It's how the assistant decides when to use it.
Find the shortest path of join relationships and foreign keys between two database tables.