{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "Thermal Minifig Maker",
  "description": "Auto-scaling foldable tabletop paper miniature creator formatted for portable thermal receipt printers (58mm / 80mm at 203 DPI), letter paper, and cardstock with 100% client-side HTML5 canvas processing.",
  "version": "1.0.0",
  "url": "https://pm2.bagsoffolding.com",
  "protocolVersion": "2024-11-05",
  "tools": [
    {
      "name": "generateMinifig",
      "description": "Renders an auto-scaled, vertically mirrored cut-and-fold paper miniature with optional half-circle base and high-contrast outline text ready for portable thermal receipt printing.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "imageUrl": {
            "type": "string",
            "description": "Public URL of character artwork or creature illustration to load and convert."
          },
          "figureSize": {
            "type": "string",
            "enum": ["14", "28", "56", "84", "112"],
            "description": "Target creature height in millimeters based on feet-to-eyes reference (14 = Small, 28 = Medium, 56 = Large, 84 = Huge, 112 = Gargantuan)."
          },
          "paperWidth": {
            "type": "string",
            "enum": ["58", "80"],
            "description": "Thermal paper roll width in millimeters ('58' for 2.25 inch / 48mm printable, '80' for 3.15 inch / 72mm printable)."
          },
          "printerDpi": {
            "type": "string",
            "enum": ["180", "200", "203", "300"],
            "description": "Printer resolution in dots per inch (default: '203' standard thermal)."
          },
          "removeBackground": {
            "type": "boolean",
            "description": "Whether to automatically flood-fill remove solid or white backgrounds."
          },
          "bgThreshold": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Color tolerance threshold (0-100) for flood-fill background removal."
          },
          "imageEffect": {
            "type": "string",
            "enum": ["none", "trace", "contrast"],
            "description": "Image filter post-processing ('none', 'trace' for line art, 'contrast' for high-contrast thermal black & white)."
          },
          "addBase": {
            "type": "boolean",
            "description": "Whether to append a foldable 1-inch half-circle base standee to top and bottom."
          },
          "showBaseText": {
            "type": "boolean",
            "description": "Whether to render custom text on the half-circle foldable base."
          },
          "baseText": {
            "type": "string",
            "description": "Custom label, creature name, player name, or URL rendered on the base."
          },
          "baseTextColor": {
            "type": "string",
            "enum": ["#000000", "#FFFFFF"],
            "description": "Base text fill color ('#000000' black or '#FFFFFF' white with contrasting border outline)."
          },
          "silhouetteBack": {
            "type": "boolean",
            "description": "Whether the flipped rear side of the folded mini is rendered as a solid black silhouette."
          },
          "numCopies": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "description": "Number of duplicate minifig prints stacked vertically in a single continuous print roll."
          }
        },
        "required": []
      }
    },
    {
      "name": "getFigureSizes",
      "description": "Returns standard tabletop creature size categories with their corresponding millimeter heights, grid squares, and feet-to-eyes scaling references.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "getPaperWidths",
      "description": "Returns supported thermal printer paper widths, printable dots, and DPI presets for mobile receipt printers.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "loadSampleImage",
      "description": "Loads the default starter hero creature illustration (Manticore) into the editor canvas for immediate preview and testing.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "exportEscposPrint",
      "description": "Generates an ESC/POS Android Print Service intent URL payload for direct printing to Bluetooth and USB thermal printers.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "numCopies": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "description": "Number of copies to send to the ESC/POS printer service."
          }
        }
      }
    }
  ]
}
