{
  "openapi": "3.1.0",
  "info": {
    "title": "mylabelmaker label maker",
    "version": "1.0.0",
    "description": "Free browser label maker. Do not draw the label. For a custom look use canvas=1 (size, background, text, image). For a known job pick a template. Pass the user's words, return the preview image and the editor link. No signup. Designs stay on the user's computer."
  },
  "servers": [
    { "url": "https://mylabelmaker.com" }
  ],
  "paths": {
    "/preview.svg": {
      "get": {
        "operationId": "previewLabel",
        "summary": "Render a filled label as SVG",
        "description": "Returns an SVG picture of a filled template or a custom canvas label. Embed this image in the chat reply. For custom labels pass canvas=1 (see /ai/canvas.txt).",
        "parameters": [
          { "name": "canvas", "in": "query", "schema": { "type": "string", "example": "1" }, "description": "Set to 1 to build a custom canvas label instead of a template" },
          { "name": "look", "in": "query", "schema": { "type": "string", "example": "premium-masculine" }, "description": "Palette: premium-masculine, premium, luxury, minimal, clean, organic, vintage, bold, soft" },
          { "name": "w", "in": "query", "schema": { "type": "number", "example": 2.5 }, "description": "Label width in inches" },
          { "name": "h", "in": "query", "schema": { "type": "number", "example": 4 }, "description": "Label height in inches" },
          { "name": "bg", "in": "query", "schema": { "type": "string", "example": "1c1917" }, "description": "Background hex color" },
          { "name": "img", "in": "query", "schema": { "type": "string" }, "description": "https URL of a logo or photo to place on the canvas" },
          { "name": "el", "in": "query", "schema": { "type": "string" }, "description": "Repeatable object: text:SPOT;x:8;y:16;w:84;h:16;s:40;f:Oswald;c:f5f0e8;a:c;b" },
          { "name": "template", "in": "query", "schema": { "type": "string", "example": "soap-wrap" }, "description": "Builtin template id from /ai/catalog.json. Skip when canvas=1." },
          { "name": "title", "in": "query", "schema": { "type": "string", "example": "Lavender Honey" } },
          { "name": "kicker", "in": "query", "schema": { "type": "string", "example": "BAR SOAP" } },
          { "name": "body", "in": "query", "schema": { "type": "string" } },
          { "name": "net", "in": "query", "schema": { "type": "string", "example": "NET 4.5 OZ" } },
          { "name": "brand", "in": "query", "schema": { "type": "string" } },
          { "name": "value", "in": "query", "schema": { "type": "string" }, "description": "Barcode or QR payload if the template has one" }
        ],
        "responses": {
          "200": {
            "description": "SVG image of the filled label",
            "content": { "image/svg+xml": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/make": {
      "get": {
        "operationId": "makeLabelCard",
        "summary": "Share card for a filled label",
        "description": "HTML page with the picture and a button that opens the filled editor. Use when you need a single link. Prefer preview.svg plus the app.mylabelmaker.com URL in chat.",
        "parameters": [
          { "name": "template", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "title", "in": "query", "schema": { "type": "string" } },
          { "name": "kicker", "in": "query", "schema": { "type": "string" } },
          { "name": "body", "in": "query", "schema": { "type": "string" } },
          { "name": "net", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "HTML share card" } }
      }
    },
    "/ai/catalog.json": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List fillable label templates",
        "responses": {
          "200": {
            "description": "Template ids, sample slots, job aliases, and custom-canvas looks",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "operationId": "mcpPage",
        "summary": "MCP page and server card",
        "description": "Browser GET returns the HTML how-to. Accept application/json returns the server card. POST is the Streamable HTTP MCP endpoint (make_label, edit_label, fill_template)."
      },
      "post": {
        "operationId": "mcpJsonRpc",
        "summary": "Model Context Protocol JSON-RPC",
        "description": "Stateless Streamable HTTP. initialize, tools/list, tools/call. No auth."
      }
    },
    "/ai/canvas.txt": {
      "get": {
        "operationId": "canvasHowTo",
        "summary": "How to build a custom canvas label URL",
        "description": "Plain-text contract: size, look, background, text placement, image, repeated el= objects. Give the user preview.svg and the app.mylabelmaker.com link.",
        "responses": {
          "200": {
            "description": "How to construct a custom canvas URL",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    }
  }
}
