Explore the schema · stop 10 of 10

find_missing_fks

Spots columns that look like foreign keys but aren't declared as one.

Works in read modeTool sets: dba · full

You might ask

“Are there relationships in this schema that aren't enforced?”

Your assistant may call find_missing_fks to answer.

How it works

  • Uses the joins the schema index inferred; without an index, it falls back to *_id columns that match a single-column primary key.
  • It only suggests. Adding the constraint is up to you.

Parameters

limitnumber
Maximum number of candidates to return. Default 20.

What your assistant reads

The description nexql-mcp sends with the tool. It's how the assistant decides when to use it.

Find likely missing foreign keys: prefers schema-index join-graph inferred edges; falls back to catalog naming (*_id columns without an FK matching a PK).