Skip to main content
Glama

Tanod Images

imagepeek: crop an image

image_crop
Read-onlyIdempotent

imagepeek: Crop an image to a box or an aspect ratio. Returns the image cropped to a box (left, top, width, height; out of bounds is a 422 crop_out_of_bounds) or to an aspect ratio such as 16:9 placed by gravity (center or a side or corner); the reply carries the applied box. Input: url or image_base64, left + top + width + height, or aspect and optional gravity, optional format, quality and auto_orient. Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF; other formats and images over 40 megapixels are refused (not charged). Output: base64 data_base64, without EXIF, GPS, XMP or IPTC; over 15 MB or 50 megapixels is a 413 (not charged). Images are never logged or stored. Typically 0.5-2 s. Price: USD 0.002. Free: 3 imagepeek calls per IP per UTC day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoBox mode: top edge in pixels.
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
leftNoBox mode: left edge in pixels (give left, top, width and height together, or aspect).
widthNoBox mode: crop width in pixels (1-32768).
aspectNoInstead of a box, e.g. 16:9, with gravity.
formatNoOutput format (default: the input's; ICO in, PNG out).
heightNoBox mode: crop height in pixels (1-32768).
gravityNoAspect mode: the part to keep: center (default), north, south, east, west, northwest, northeast, southwest or southeast.center
qualityNoEncoder quality 1-100 (lossy formats).
auto_orientNoApply the EXIF orientation first.
image_base64NoThe image as standard or url-safe base64 (at most 10 MB decoded; a data:image/...;base64, prefix is fine); or use url.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
boxNo
bytesNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
inputNo
notesNo
widthNo
formatNo
heightNo
sourceNo
final_urlNo
operationNo
source_urlNo
data_base64No
content_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / gravity / description
      Added value: +"Aspect mode: the part to keep: center (default), north, south, east, west, northwest, northeast, southwest or southeast."
    • addedInput schema / properties / height / description
      Added value: +"Box mode: crop height in pixels (1-32768)."
    • addedInput schema / properties / left / description
      Added value: +"Box mode: left edge in pixels (give left, top, width and height together, or aspect)."
    • addedInput schema / properties / top / description
      Added value: +"Box mode: top edge in pixels."
    • changedInput schema / properties / url / description
      Previous value: -"Public http(s) URL of the image (at most 10 MB); or use image_base64."New value: +"Public http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64."
    • addedInput schema / properties / width / description
      Added value: +"Box mode: crop width in pixels (1-32768)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "box": {
      +      "properties": {
      +        "height": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "left": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "top": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "width": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "content_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data_base64": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "final_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "format": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "height": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "input": {
      +      "properties": {
      +        "animated": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "bytes": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "format": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "frames": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "has_alpha": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "height": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "width": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "notes": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "operation": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "width": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources