contentrain_describe_format
Get the Contentrain content file format specification including JSON structure, markdown conventions, meta files, and locale strategies for any language or platform.
Instructions
Describes the Contentrain content file format for any language/platform. Returns a comprehensive specification of the file structure, JSON formats, markdown conventions, meta files, and locale strategies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Implementation of the contentrain_describe_format tool, which returns a documentation object describing the Contentrain file system structure and data formats.
server.tool( 'contentrain_describe_format', 'Describes the Contentrain content file format for any language/platform. Returns a comprehensive specification of the file structure, JSON formats, markdown conventions, meta files, and locale strategies.', {}, async () => { const formatSpec = { overview: 'Contentrain stores content as plain JSON and Markdown files in a .contentrain/ directory at the project root. All files are committed to git.', directory_structure: { description: 'Standard layout of .contentrain/ directory', layout: { '.contentrain/config.json': 'Project configuration (stack, workflow, locales, domains)', '.contentrain/context.json': 'Last operation metadata (written by MCP after every write)', '.contentrain/vocabulary.json': 'Shared vocabulary/terms (optional)', '.contentrain/models/{model-id}.json': 'Model schema definitions', '.contentrain/content/{domain}/{model-id}/': 'Content files per model', '.contentrain/meta/{model-id}/': 'Metadata files per model (status, source, timestamps)', }, }, model_kinds: { collection: { description: 'Multiple entries stored as an object-map keyed by entry ID', storage_format: 'JSON object-map: { "entry-id-1": { ...fields }, "entry-id-2": { ...fields } }', note: 'Keys are sorted alphabetically for canonical output. Entry IDs are alphanumeric (1-40 chars, hyphens/underscores allowed).', example: '{ "abc123": { "title": "Hello", "slug": "hello" }, "def456": { "title": "World", "slug": "world" } }', }, singleton: { description: 'Single entry (e.g. site settings, hero section)', storage_format: 'JSON object with field key-value pairs: { "title": "My Site", "description": "..." }', }, document: { description: 'Markdown files with YAML-like frontmatter', storage_format: 'Markdown file: ---\\nslug: my-post\\ntitle: My Post\\n---\\n\\nMarkdown body content here.', frontmatter_rules: [ 'Delimited by --- on its own line', 'Key-value pairs: key: value', 'Arrays: key:\\n - item1\\n - item2', 'Inline arrays: key: [item1, item2]', 'Values auto-parsed: true/false -> boolean, integers -> number, quoted -> string', '"body" key is reserved for the markdown content below the frontmatter', ], }, dictionary: { description: 'Flat key-value string map (e.g. i18n translation files)', storage_format: 'JSON object: { "greeting": "Hello", "farewell": "Goodbye" }', note: 'All values must be strings.', }, }, meta_files: { description: 'Metadata is stored separately from content in .contentrain/meta/{model-id}/',