{
    "$schema": "https:\/\/json-schema.org\/draft\/2020-12\/schema",
    "$id": "https:\/\/www.totalcms.co\/schemas\/blog.json",
    "type": "object",
    "id": "blog",
    "description": "A schema for a Total CMS Blog object",
    "properties": {
        "draft": {
            "type": "boolean",
            "label": "Draft",
            "help": "Mark this post as a draft",
            "field": "checkbox",
            "default": false,
            "mcp": {
                "description": "Whether the post is a draft. Drafts are auto-hidden from anonymous MCP callers; admin callers see them by default."
            }
        },
        "featured": {
            "type": "boolean",
            "label": "Featured",
            "help": "Mark this post as featured",
            "field": "checkbox",
            "factory": "boolean",
            "mcp": {
                "description": "Whether the post is featured (typically promoted on the homepage or in highlighted listings)."
            }
        },
        "id": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/slug.json",
            "label": "Blog Post ID",
            "help": "A unique ID for this post. No spaces or special characters.",
            "field": "id",
            "factory": "slug",
            "settings": {
                "autogen": "${title}"
            },
            "mcp": {
                "description": "Unique URL-safe slug identifying the post. Appears in the post's public URL (e.g. \/blog\/{id})."
            }
        },
        "title": {
            "type": "string",
            "label": "Title",
            "help": "Blog Post title",
            "field": "text",
            "factory": "catchPhrase",
            "mcp": {
                "description": "Display title of the post, shown in listings and as the page H1."
            }
        },
        "date": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/date.json",
            "label": "Date",
            "help": "Blog Post date",
            "field": "date",
            "default": "now",
            "factory": "iso8601",
            "mcp": {
                "description": "Publication date of the post (ISO 8601). Use for chronological filtering and sorting."
            }
        },
        "author": {
            "type": "string",
            "label": "Author",
            "help": "Author for this post",
            "field": "text",
            "factory": "name",
            "settings": {
                "propertyOptions": true
            },
            "mcp": {
                "description": "Display name of the post's author."
            }
        },
        "summary": {
            "type": "string",
            "label": "Summary",
            "help": "Blog Post summary",
            "field": "styledtext",
            "factory": "styledtext(1,3,false)",
            "mcp": {
                "description": "Short summary or excerpt of the post, shown in listings and meta descriptions. Rich text \u2014 request format=markdown for token-efficient output."
            }
        },
        "media": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/url.json",
            "label": "Media",
            "help": "Media URL for this post",
            "field": "url",
            "factory": "url",
            "mcp": {
                "description": "Optional URL to associated media (video embed, podcast episode, etc.). Empty when the post has no media."
            }
        },
        "content": {
            "type": "string",
            "label": "Content",
            "help": "Main blog post content",
            "field": "styledtext",
            "factory": "styledtext(1,8,true)",
            "mcp": {
                "description": "Main body content of the post. Rich text \u2014 request format=markdown for token-efficient output or format=text for plain text."
            }
        },
        "extra": {
            "type": "string",
            "label": "Extra Content",
            "help": "Extra content area for this post",
            "field": "styledtext",
            "factory": "styledtext(0,3,true)",
            "mcp": {
                "description": "Secondary content area for sidebars, footnotes, or supplementary material. Often empty."
            }
        },
        "categories": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/list.json",
            "label": "Categories",
            "help": "A list of categories for this post",
            "field": "list",
            "factory": "tags",
            "settings": {
                "propertyOptions": true
            },
            "mcp": {
                "description": "Categories the post belongs to (array of strings). Filterable with include='categories:tech' to find posts in a category.",
                "filterable": true
            }
        },
        "tags": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/list.json",
            "label": "Tags",
            "help": "A list of tags for this post",
            "field": "list",
            "factory": "tags",
            "settings": {
                "propertyOptions": true
            },
            "mcp": {
                "description": "Tags applied to the post (array of strings). Filterable with include='tags:php'.",
                "filterable": true
            }
        },
        "image": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/image.json",
            "label": "Image",
            "help": "Main image for this post",
            "field": "image",
            "factory": "imageShapes(1920,1080)",
            "mcp": {
                "description": "Hero\/cover image for the post. Object includes name, alt text, width, height. Use the URL builder helpers to construct a fetchable URL."
            }
        },
        "gallery": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/gallery.json",
            "label": "Gallery",
            "help": "Gallery of images for this post",
            "field": "gallery",
            "factory": "galleryShapes(5,1920,1080)",
            "mcp": {
                "description": "Image gallery for the post (array of image objects). Empty when the post has no gallery."
            }
        },
        "updated": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/date.json",
            "label": "Updated Date",
            "help": "Blog Post updated date",
            "field": "datetime",
            "factory": "iso8601",
            "settings": {
                "onUpdate": true,
                "readonly": true
            },
            "mcp": {
                "description": "Auto-set timestamp of the last save (ISO 8601). System-managed; not editable by users."
            }
        },
        "created": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/date.json",
            "label": "Creation Date",
            "help": "Blog Post creation date",
            "field": "datetime",
            "factory": "iso8601",
            "settings": {
                "onCreate": true,
                "readonly": true
            },
            "mcp": {
                "description": "Auto-set timestamp when the post was first created (ISO 8601). System-managed; immutable."
            }
        }
    },
    "required": [
        "id",
        "title",
        "updated",
        "created"
    ],
    "index": [
        "id",
        "title",
        "image",
        "date",
        "draft",
        "featured",
        "author",
        "categories",
        "tags",
        "summary",
        "updated",
        "created"
    ],
    "formgrid": "id id\ntitle title\ndraft featured\ndate author\nimage image\ncategories categories\ntags tags\nsummary summary\ncontent content\nmedia media\ngallery gallery\nextra extra\nupdated created"
}