Update a table join relationship
set_relationshipAccept, reject, add, update, or delete a join relationship between two table columns, identified by relationship_id or source and target, to control which joins enter join paths.
Instructions
Modify one join relationship between two table columns: accept or reject a proposed join, add a missing one, update its role/description/default flag, or delete it permanently. Use after reviewing joins in list_relationships; use find_join_path to inspect active routes instead. Identify the join by relationship_id or by source and target ('table.column'). Only accepted joins enter join paths and survive re-scans; action='delete' removes the record permanently while 'reject' preserves the negative decision. Fails if the columns or relationship do not exist.
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": {
"action": "<action>"
},
"name": "set_relationship"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Business role when multiple columns reference the same table, e.g. 'billing'. | |
| action | Yes | Operation to perform: accept or reject a proposed join, add a missing one, update metadata/default flag, or delete permanently. | |
| source | No | Foreign-key column formatted as 'table.column' (used with target when adding or without relationship_id). | |
| target | No | Referenced key column formatted as 'table.column' (used with source). | |
| datasource | No | Datasource name. Optional when only one datasource is registered. | |
| is_default | No | Set true to mark this join as the default path between its two tables. | |
| description | No | Business meaning of this join relationship. | |
| relationship_id | No | Relationship id from list_relationships (alternative to passing source and target). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||