{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "Bags of Folding — TTRPG Projection Mapping",
  "description": "AR/ArUco auto-keystone and 1-inch (25.4mm) metric-locked tabletop map projection engine for D&D and TTRPG sessions.",
  "version": "0.1.0",
  "url": "https://projectionmapping.bagsoffolding.com",
  "protocolVersion": "2024-11-05",
  "tools": [
    {
      "name": "calibrateTable",
      "description": "Runs AR/ArUco 1-inch (25.4mm) keystone calibration and triggers mandatory vision teardown on lock.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "targetMode": {
            "type": "string",
            "description": "Physical calibration target preset (POSTER_BOARD, HYBRID_SHEET_AND_CARDS, POKER_CARDS_ONLY, US_LETTER_SHEET, A4_SHEET)"
          }
        }
      }
    },
    {
      "name": "setVirtualCamera",
      "description": "Pans and zooms the Virtual PTZ camera while keeping tabletop squares locked to 25.4mm.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "panXSquares": {
            "type": "number",
            "description": "Horizontal pan offset in 1-inch grid squares"
          },
          "panYSquares": {
            "type": "number",
            "description": "Vertical pan offset in 1-inch grid squares"
          },
          "zoomFactor": {
            "type": "number",
            "description": "Zoom multiplier"
          }
        }
      }
    },
    {
      "name": "spawnTabletopEffect",
      "description": "Spawns a ONE_SHOT, LOOP, or CHAINED WebGL spell or environmental hazard effect at grid coordinates.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "fxType": {
            "type": "string",
            "description": "FIREBALL_STREAK | FIRE_RING | CAMPFIRE | POISON_CLOUD"
          },
          "gridX": {
            "type": "number",
            "description": "Target X grid coordinate"
          },
          "gridY": {
            "type": "number",
            "description": "Target Y grid coordinate"
          },
          "radiusSquares": {
            "type": "number",
            "description": "Effect radius in 1-inch squares"
          },
          "lifecycle": {
            "type": "string",
            "description": "ONE_SHOT | LOOP | CHAINED"
          }
        },
        "required": [
          "fxType",
          "gridX",
          "gridY"
        ]
      }
    },
    {
      "name": "applyFogAction",
      "description": "Reveals, resets, blackouts, or brush-edits the Fog of War layer.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "description": "REVEAL_ALL | RESET_FOG | BLACKOUT | BRUSH_STROKE"
          },
          "gridX": {
            "type": "number",
            "description": "Brush center X in squares"
          },
          "gridY": {
            "type": "number",
            "description": "Brush center Y in squares"
          },
          "radiusSquares": {
            "type": "number",
            "description": "Brush radius in squares"
          }
        },
        "required": [
          "mode"
        ]
      }
    },
    {
      "name": "executeNfcMacro",
      "description": "Executes an NTAG215/216 TTRPG macro batch (map variant swap, camera shake, FX, audio).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "macroId": {
            "type": "string",
            "description": "Macro preset identifier"
          }
        },
        "required": [
          "macroId"
        ]
      }
    },
    {
      "name": "generateCalibrationPrintables",
      "description": "Generates 1:1 millimeter-locked US Letter/A4 sheets or 63.5x88.9mm ArUco calibration poker cards.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "description": "CARDS | US_LETTER | A4"
          }
        },
        "required": [
          "format"
        ]
      }
    }
  ]
}