{
    "$schema": "https:\/\/json-schema.org\/draft\/2020-12\/schema",
    "$id": "https:\/\/www.totalcms.co\/schemas\/mcp-prompt.json",
    "type": "object",
    "id": "mcp-prompt",
    "description": "A templated AI-agent workflow exposed via the MCP server's prompts\/list and prompts\/get endpoints.",
    "properties": {
        "id": {
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/slug.json",
            "label": "Name",
            "help": "Snake_case identifier AI clients use to call this prompt.",
            "field": "id",
            "factory": "slug",
            "pattern": "^[a-z][a-z0-9_]*$",
            "maxLength": 64,
            "settings": {
                "snakeCase": true
            }
        },
        "description": {
            "type": "string",
            "label": "Description",
            "help": "What this prompt does \u2014 shown to AI agents in prompts\/list. Write for AI consumption.",
            "field": "textarea",
            "settings": {
                "rows": 3
            }
        },
        "targetCollection": {
            "type": "string",
            "label": "Target Collection",
            "help": "Which collection this prompt scopes to. Leave blank for site-wide.",
            "field": "select",
            "placeholder": "All Collections",
            "settings": {
                "propertyOptions": "collectionIds"
            }
        },
        "access": {
            "type": "string",
            "label": "Access",
            "help": "Who can call this prompt. Defaults to inheriting the target collection's MCP access (admin for site-wide).",
            "field": "select",
            "placeholder": "Inherit from Collection",
            "options": [
                {
                    "value": "admin",
                    "label": "Admin only (API key)"
                },
                {
                    "value": "authenticated",
                    "label": "Authenticated (OAuth Bearer token)"
                },
                {
                    "value": "public",
                    "label": "Public (anonymous AI agents)"
                }
            ]
        },
        "args": {
            "field": "deck",
            "label": "Arguments",
            "help": "Typed caller parameters available in the body as <code>{{ args.&lt;name&gt; }}<\/code>.",
            "schemaref": "https:\/\/www.totalcms.co\/schemas\/mcp-prompt-arg.json",
            "$ref": "https:\/\/www.totalcms.co\/schemas\/properties\/deck.json",
            "patternProperties": {
                "^[a-zA-Z]\\w*$": {
                    "$ref": "https:\/\/www.totalcms.co\/schemas\/mcp-prompt-arg.json"
                }
            }
        },
        "body": {
            "type": "string",
            "label": "Prompt Body",
            "help": "The prompt text. Full Twig: <code>{{ args.x }}<\/code>, <code>{% for ... %}<\/code>, <code>cms.object(...)<\/code>, all <code>cms.*<\/code> functions.",
            "field": "code",
            "settings": {
                "mode": "twig",
                "rows": 20
            }
        }
    },
    "required": [
        "id",
        "description",
        "body"
    ],
    "index": [
        "id",
        "description",
        "targetCollection",
        "access"
    ],
    "formgrid": "id\ndescription\ntargetCollection\naccess\nargs\nbody"
}