Propose a schema change
propose_changeProposes a schema change for the user to review in JillionDB. Nothing changes until they approve it. Send exactly one of "operations" (preferred: renames are explicit, so no data is lost) or "sql" (the complete desired schema as CREATE TABLE statements; a dropped and re-added column is flagged as a possible rename). Returns the risk of each change and a review link to give the user.
Each operation is an object with "op" and the fields below. Names are table and column names as they appear in get_schema.
create_table: table, columns [{name, type, nullable?, default?, unique?, primary_key?, comment?, references?}], primary_key? [names], comment?
drop_table: table
rename_table: table, to
add_column: table, column {name, type, nullable?, default?, unique?, comment?, references?}
drop_column: table, column
rename_column: table, column, to
alter_column: table, column, type?, nullable?, default?, unique?, comment?
add_index: table, columns [names], unique?, name?
drop_index: table, name or columns
add_foreign_key: table, columns [names], references {table, columns? (defaults to its primary key), on_delete?}
drop_foreign_key: table, columns or name
set_primary_key: table, columns
add_check: table, expression, name?
drop_check: table, name or expression
set_comment: table, column?, comment Types: uuid, text, varchar(n), char(n), smallint, integer, bigint, serial, bigserial, decimal(p,s), float, double, boolean, date, time, timestamp, timestamptz, json, binary, enum('a','b'). Defaults: a value (string, number, true/false), "now", "uuid", "autoincrement", {"value": ...} for literal text that looks like a keyword, or {"sql": "..."} for a raw expression. references: {table, column?, on_delete?: cascade | restrict | set null | set default | no action}.
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": {
"project_id": "<project_id>",
"summary": "<summary>"
},
"name": "propose_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| summary | Yes | One sentence the reviewer reads first: what changes and why. | |
| operations | No | ||
| project_id | Yes |