contentrain_validate
Validate project content against model schemas to detect field, type, relation, secret, and i18n issues, and auto-fix structural problems when fix is enabled.
Instructions
Validate project content against model schemas. Detects required field violations, type mismatches, broken relations, secret leaks, i18n parity issues, and more. If fix:true, auto-fixes structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, scheduling keys an older content_save leaked into document frontmatter) and backfills a missing model title_field — do NOT manually edit .contentrain/ files. Content without meta gets meta with status published, matching what delivery already serves. A fix that would change whether an entry is delivered is listed in visibility_changes and left on its branch for review instead of auto-merged.
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": "contentrain_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix | No | Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, publish_at/expire_at copies an older content_save left in document frontmatter when meta holds the same key) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Meta backfilled for content without meta is status published (delivery already serves such entries); a fix that changes whether an entry is delivered is listed in visibility_changes and held for review. Default: false | |
| model | No | Model ID to validate (omit for all models) |