WebMCP Registry

crop_image

verifiedv0.1

Crop one JPEG, PNG, WebP or AVIF raster in the browser to an explicit source-pixel rectangle (sx, sy, sw, sh). Pass image { mime, base64 } (max 12 MiB decoded). ratio locks the UI for humans; the machine must still send the rectangle in source pixels. Variant URLs are not a second machine Tool. Missing rect is invalid — do not guess a crop. Do not upload.

Updated 9/3/2026 · Created 9/3/2026

Input Schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "image",
    "sx",
    "sy",
    "sw",
    "sh"
  ],
  "properties": {
    "sh": {
      "type": "integer",
      "exclusiveMinimum": 0
    },
    "sw": {
      "type": "integer",
      "exclusiveMinimum": 0
    },
    "sx": {
      "type": "integer",
      "minimum": 0
    },
    "sy": {
      "type": "integer",
      "minimum": 0
    },
    "image": {
      "type": "object",
      "required": [
        "mime",
        "base64"
      ],
      "properties": {
        "mime": {
          "enum": [
            "image/jpeg",
            "image/png",
            "image/webp",
            "image/avif",
            "image/heic",
            "image/heif",
            "image/jxl"
          ],
          "type": "string"
        },
        "base64": {
          "type": "string",
          "maxLength": 16777220,
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "label": {
      "enum": [
        "generic",
        "square",
        "widescreen",
        "instagram"
      ],
      "type": "string",
      "default": "generic"
    },
    "ratio": {
      "enum": [
        "free",
        "1:1",
        "16:9",
        "4:5",
        "9:16",
        "4:3",
        "3:2"
      ],
      "type": "string",
      "default": "free"
    }
  },
  "additionalProperties": false
}

Full Contract

{
  "name": "crop_image",
  "description": "Crop one JPEG, PNG, WebP or AVIF raster in the browser to an explicit source-pixel rectangle (sx, sy, sw, sh). Pass image { mime, base64 } (max 12 MiB decoded). ratio locks the UI for humans; the machine must still send the rectangle in source pixels. Variant URLs are not a second machine Tool. Missing rect is invalid — do not guess a crop. Do not upload.",
  "inputSchema": {
    "type": "object",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "required": [
      "image",
      "sx",
      "sy",
      "sw",
      "sh"
    ],
    "properties": {
      "sh": {
        "type": "integer",
        "exclusiveMinimum": 0
      },
      "sw": {
        "type": "integer",
        "exclusiveMinimum": 0
      },
      "sx": {
        "type": "integer",
        "minimum": 0
      },
      "sy": {
        "type": "integer",
        "minimum": 0
      },
      "image": {
        "type": "object",
        "required": [
          "mime",
          "base64"
        ],
        "properties": {
          "mime": {
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/avif",
              "image/heic",
              "image/heif",
              "image/jxl"
            ],
            "type": "string"
          },
          "base64": {
            "type": "string",
            "maxLength": 16777220,
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "label": {
        "enum": [
          "generic",
          "square",
          "widescreen",
          "instagram"
        ],
        "type": "string",
        "default": "generic"
      },
      "ratio": {
        "enum": [
          "free",
          "1:1",
          "16:9",
          "4:5",
          "9:16",
          "4:3",
          "3:2"
        ],
        "type": "string",
        "default": "free"
      }
    },
    "additionalProperties": false
  }
}

GET /api/tool/simpletoolstack.com/crop_image