diff_schema
Compare a snapshot against the live Directus data model to preview migration operations before applying changes; no data is modified.
Instructions
Compares a snapshot against the live data model and reports the operations that applying it would perform. Read-only, nothing is modified, which makes it the safe way to preview a migration before apply_schema, the tool that consumes the { hash, diff } object returned here. mode mirror (default) includes deletions so the live model would end up matching the snapshot exactly; merge drops them for a strictly additive diff. force bypasses the Directus version and database vendor checks and risks producing a diff that cannot be applied. An empty diff means the model already matches.
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": {
"snapshot": "<snapshot>"
},
"name": "diff_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'mirror' (default) reports every operation including deletions; 'merge' excludes deletions for an additive diff. | |
| force | No | Bypass the Directus version and database vendor checks | |
| snapshot | Yes | A snapshot as returned by get_schema_snapshot |