get_schema_snapshot
Exports the Directus data model as a snapshot for schema diffing, backups, environment migration, or git versioning. Use it to capture collections, fields, and relations before destructive changes.
Instructions
Exports the data model (collections, fields and relations, with no item data) as a snapshot object that diff_schema and apply_schema accept. Use it to back up the model before a destructive change, to move a model between environments, or to version it in git. Read-only. include_collections and exclude_collections are mutually exclusive and produce a partial snapshot, which on apply can read as a request to delete everything left out, so prefer a full snapshot for migrations.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_schema_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exclude_collections | No | Exclude these collections. Mutually exclusive with include_collections. | |
| include_collections | No | Restrict the snapshot to these collections. Mutually exclusive with exclude_collections. |