compare_schemas
Compares two database schemas to report added, dropped, or changed tables, columns, indexes, foreign keys, and constraints, and returns a migration script without executing it.
Instructions
Compares two schemas, of one connection or of two connections of the same kind of database, as the PlatypusDB schema compare does: the differences (tables, columns, indexes, foreign keys and constraints added, dropped or changed) and the migration script that makes other_schema like schema, as text. Nothing runs: the script reaches the user only through propose_sql. A script too long for max_bytes (default 32768) is left out whole and the answer says so: it is never cut.
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": {
"connection": "<connection>",
"schema": "<schema>",
"other_schema": "<other_schema>"
},
"name": "compare_schemas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | The model schema (a database in MySQL, `main` in SQLite and DuckDB). | |
| max_bytes | No | Bytes of output at most (default 32768, up to 1048576). | |
| connection | Yes | The connection with the schema that is the model, as `list_connections` shows it. | |
| other_schema | Yes | The schema the script would change to make it like `schema`. | |
| timeout_seconds | No | Seconds each schema may take to read before it is cancelled (default 30, up to 300). | |
| other_connection | No | The connection with the schema to change; left out, the same connection. |