Diff two databases
litescope_diffCompare two SQLite or D1 databases and return their schema and row-count differences as JSON. Works across local files, D1, and Turso.
Instructions
Compare two SQLite or D1 databases and return their schema and row-count differences as JSON. Works across any combination of local files, D1, and Turso — e.g. diff a local migration target against a live D1 database. Read-only.
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": {
"old": "<old>",
"new": "<new>"
},
"name": "litescope_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | Changed ('after') source — Database source: a local file path (./app.db), a Cloudflare D1 DSN (d1://DB_ID when CLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID are set, or d1://TOKEN@ACCOUNT_ID/DB_ID), or a Turso DSN (turso://TOKEN@ORG/DB). | |
| old | Yes | Baseline ('before') source — Database source: a local file path (./app.db), a Cloudflare D1 DSN (d1://DB_ID when CLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID are set, or d1://TOKEN@ACCOUNT_ID/DB_ID), or a Turso DSN (turso://TOKEN@ORG/DB). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | Counts of tables added/removed/modified. | |
| data_changes | No | Per-table row-count differences (present when data differs). | |
| schema_changes | Yes | Per-table schema differences. |