Plan keys and relationships (nothing deployed)
plan_backendInfers primary keys and relationships for the tables in a schema and proposes them as a plan. Requires workspace and source. Returns JSON: summary, keys and relationships each with the rule behind it (K0–K5, R0–R5), ambiguous columns, keyless tables, suggested composite keys and a Mermaid ER diagram. Rule R5 counts code and role columns the names left unlinked against the rows (read-only counting queries, at most 20, over the first 200 distinct values of a column); candidates it could not confirm are listed as proposed. Changes nothing in Fabric. validate_plan checks it against the rows; create_backend builds the API. Without schema, a source with several schemas that hold tables gets {choose_schema, schemas: [{schema, tables}], summary, hint} and nothing is planned (n169). Errors: {error, kind, hint}.
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": {
"workspace": "<workspace>",
"source": "<source>"
},
"name": "plan_backend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Primary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}. | |
| detail | No | "auto" (default: full up to 60 tables, else summary), "full" or "summary". | auto |
| schema | No | Schema in the source; leave it out unless the user named one. Default: the only schema with tables; when the source has several, the answer lists them and asks which (choose_schema), and nothing is planned. | |
| source | Yes | Lakehouse, warehouse or SQL database, name or id. | |
| tables | No | Table names or globs to show. Default all. Example: ["sales_*"]. | |
| mermaid | No | false leaves the Mermaid ER diagram out of a full answer. Default true. Example: false. | |
| confirmed | No | Relationships the user confirmed, added to the plan. Default none. Example: [{"source": "orders", "source_cols": ["ship_to_id"], "target": "addresses", "target_cols": ["address_id"]}]. | |
| workspace | Yes | Fabric workspace, name or id. |