contentrain_model_save
Save content model definitions with automatic git commits, eliminating the need to manually edit .contentrain/ files.
Instructions
Create or update a model definition. Changes are auto-committed to git — do NOT manually edit .contentrain/ files after calling this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Model ID (kebab-case, e.g. "blog-post") | |
| name | Yes | Human-readable name | |
| kind | Yes | Model kind | |
| domain | Yes | Content domain (e.g. "blog", "marketing", "system") | |
| i18n | Yes | Whether this model supports localization | |
| description | No | Model description | |
| fields | No | Field definitions (not needed for dictionary) | |
| content_path | No | Framework-relative path for content files (e.g. "content/blog", "locales"). When set, content is written here instead of .contentrain/content/ | |
| locale_strategy | No | How locale is encoded in file names. Default: "file" |