<!--
Full-page Markdown export (rendered HTML → GFM).
Source: https://neotoma.io/zh/schema-constraints
Generated: 2026-04-28T13:35:52.990Z
-->
# Schema constraints
Entities conform to defined types and validation rules. Type mismatches are flagged at store time and missing required fields generate warnings, so schema drift does not silently degrade state quality.
## Before vs after
Before: one tool stores `age: "thirty"` while another expects a number. After: schema validation rejects the invalid write and returns a deterministic error.
\# Invalid payload example
neotoma store --json='\[{"entity\_type":"person","name":"Ana Rivera","age":"thirty"}\]'
# Valid payload
neotoma store --json='\[{"entity\_type":"person","name":"Ana Rivera","age":30}\]'
This protects [deterministic state evolution](/deterministic-state-evolution) and reduces [silent mutation risk](/silent-mutation-risk). See [conflicting facts risk](/conflicting-facts-risk) for conflict handling.