validate_collection_schema
Checks a Directus collection for schema issues—missing primary keys, broken relations, type mismatches, or constraint violations—and reports findings without making repairs.
Instructions
Checks one collection for schema problems and returns the findings: missing primary key, one-sided or broken relations, a database type that disagrees with its interface, constraints the stored data violates. Read-only, and it reports rather than repairs. Use it after create_collection or apply_schema, or when writes fail for no obvious reason; use diagnose_collection_access when permissions rather than schema are the suspicion. strict: true also reports conventions and warnings instead of errors alone.
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": {
"collection": "<collection>"
},
"name": "validate_collection_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strict | No | Enable strict validation | |
| collection | Yes | Collection name |