{
  "version": 1,
  "availability": "Requires an installed plugin offering the requested action; choose from its Quick Actions list",
  "docsUrl": "https://docs.hypermatic.com/hypercrop/automation/parameters",
  "inputLimits": {
    "quickActionsPasteMaxCharacters": 149,
    "parserOptionsMaxCharacters": 16384,
    "maxTargetIds": 100,
    "rejectedAmbiguousLength": 150
  },
  "optionDefinitionFormat": "Hypermatic parameter fields v1; not JSON Schema",
  "plugin": "hypercrop",
  "parameters": [
    "command",
    "parameters"
  ],
  "shortcuts": [
    {
      "command": "open",
      "name": "Open HyperCrop",
      "action": "open",
      "advanced": false,
      "parameters": [],
      "target": "none"
    },
    {
      "command": "shortcut-crop",
      "name": "Crop Selected Images",
      "action": "crop",
      "advanced": false,
      "parameters": [
        {
          "name": "Name",
          "key": "name",
          "allowFreeform": true,
          "optional": false
        },
        {
          "name": "Width (px)",
          "key": "width",
          "allowFreeform": true,
          "optional": false
        },
        {
          "name": "Height (px)",
          "key": "height",
          "allowFreeform": true,
          "optional": false
        },
        {
          "name": "Format",
          "key": "format",
          "allowFreeform": false,
          "optional": true
        }
      ],
      "mapping": "name, width and height form one sizes item",
      "target": "current selection"
    },
    {
      "command": "shortcut-presets",
      "name": "Save Custom Crop Size",
      "action": "presets",
      "advanced": false,
      "parameters": [
        {
          "name": "Name",
          "key": "name",
          "allowFreeform": true,
          "optional": false
        },
        {
          "name": "Width (px)",
          "key": "width",
          "allowFreeform": true,
          "optional": true
        },
        {
          "name": "Height (px)",
          "key": "height",
          "allowFreeform": true,
          "optional": true
        }
      ],
      "mapping": "name, width and height form one sizes item",
      "target": "none"
    },
    {
      "command": "advanced-crop",
      "name": "Advanced: Crop Selected Images",
      "action": "crop",
      "advanced": true,
      "parameters": [
        {
          "name": "Advanced options (JSON)",
          "key": "options",
          "allowFreeform": true,
          "optional": false
        },
        {
          "name": "Target (optional node IDs)",
          "key": "target",
          "allowFreeform": true,
          "optional": true
        }
      ],
      "target": "optional node IDs or current selection"
    },
    {
      "command": "advanced-presets",
      "name": "Advanced: Save Custom Crop Size",
      "action": "presets",
      "advanced": true,
      "parameters": [
        {
          "name": "Advanced options (JSON)",
          "key": "options",
          "allowFreeform": true,
          "optional": false
        }
      ],
      "target": "none"
    }
  ],
  "actions": {
    "open": {
      "description": "Open the normal interactive plugin",
      "fields": {},
      "target": "none",
      "execution": "builtin"
    },
    "crop": {
      "description": "Crop selected layers to named sizes and download a ZIP",
      "fields": {
        "sizes": {
          "type": "array",
          "min": 1,
          "max": 20,
          "required": true,
          "item": {
            "type": "object",
            "description": "Named size",
            "fields": {
              "name": {
                "type": "string",
                "min": 1,
                "max": 120,
                "required": true,
                "description": "Name of the new item"
              },
              "width": {
                "type": "number",
                "min": 1,
                "max": 8192,
                "required": true,
                "description": "Width in pixels"
              },
              "height": {
                "type": "number",
                "min": 1,
                "max": 8192,
                "required": true,
                "description": "Height in pixels"
              }
            }
          },
          "description": "Named output dimensions"
        },
        "format": {
          "type": "string",
          "values": [
            "jpg",
            "png"
          ],
          "default": "jpg",
          "description": "Image format"
        },
        "quality": {
          "type": "number",
          "min": 1,
          "max": 100,
          "default": 90,
          "description": "Image quality"
        },
        "fill": {
          "type": "string",
          "values": [
            "cover",
            "contain"
          ],
          "default": "cover",
          "description": "Crop or contain the source"
        },
        "horizontal": {
          "type": "string",
          "values": [
            "left",
            "center",
            "right"
          ],
          "default": "center",
          "description": "Horizontal alignment"
        },
        "vertical": {
          "type": "string",
          "values": [
            "top",
            "center",
            "bottom"
          ],
          "default": "center",
          "description": "Vertical alignment"
        },
        "smart": {
          "type": "boolean",
          "default": false,
          "description": "Use content-aware cropping without face detection"
        },
        "retina": {
          "type": "boolean",
          "default": false,
          "description": "Use retina source images"
        },
        "background": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$",
          "default": "#000000",
          "description": "Contain background for JPEG"
        }
      },
      "target": "many",
      "execution": "worker"
    },
    "presets": {
      "description": "Add or update named sizes in the saved Custom Crop Sizes collection, preserving other collections",
      "fields": {
        "sizes": {
          "type": "array",
          "description": "Upsert by exact unique size name; maximum 200 resulting custom sizes",
          "required": true,
          "min": 1,
          "max": 20,
          "item": {
            "type": "object",
            "description": "Named size",
            "fields": {
              "name": {
                "type": "string",
                "description": "Size name",
                "required": true,
                "min": 1,
                "max": 120
              },
              "width": {
                "type": "number",
                "description": "Width in pixels",
                "min": 1,
                "max": 8192,
                "default": 1080
              },
              "height": {
                "type": "number",
                "description": "Height in pixels",
                "min": 1,
                "max": 8192,
                "default": 1080
              }
            }
          }
        }
      },
      "target": "none",
      "execution": "worker"
    }
  },
  "examples": {
    "crop": {
      "sizes": [
        {
          "name": "Square",
          "width": 1080,
          "height": 1080
        }
      ]
    },
    "presets": {
      "sizes": [
        {
          "name": "Square",
          "width": 1080,
          "height": 1080
        }
      ]
    }
  },
  "limitsAndBehavior": "Face detection and insertion into Figma remain interactive. Presets explicitly updates the saved custom collection; crop remains a one-off operation. Each command is limited to 200 output images.",
  "completion": {
    "deadlineMs": 300000,
    "visibleNotifications": true,
    "nativeSaveDialog": true,
    "verifySavedArtifact": true
  },
  "invocation": "Figma Quick Actions or a verified host launcher; no REST/MCP launcher is provided",
  "results": "Normal Figma success/error notifications, document changes, native file downloads and published pages"
}
