Skip to main content
Glama

image_crop

Idempotent

imagepeek: Crop an image to a box or an aspect ratio. To scale instead use image_resize. Returns a crop (out of bounds: 422 crop_out_of_bounds); auto_orient=false uses stored axes. PNG, JPEG, WebP, GIF, TIFF, BMP, ICO, AVIF; unsupported or >40 MP: not charged. Re-encoding strips EXIF/GPS/XMP/IPTC. Output >15 MB or >50 MP: uncharged 413. Images are not logged; a result is kept only with output "url" (24 h). Typically 0.5-2 s. Price: USD 0.002. Free: 3 imagepeek calls per IP per UTC day. Docs: https://tanod.dev/learn/image-crop-api.html

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "image_crop"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoBox: top in px.
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
leftNoBox: left in px. Use left, top, width and height, or aspect.
widthNoBox width in px.
aspectNoCrop ratio, e.g. 16:9; use with gravity, instead of a box.
formatNoOutput format (default: the input's; ICO in, PNG out).
heightNoBox height in px.
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64
gravityNoAspect crop anchor.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

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / aspect / description
      Previous value: -"Instead of a box, e.g. 16:9, with gravity."New value: +"Crop ratio, e.g. 16:9; use with gravity, instead of a box."
    • changedInput schema / properties / gravity / description
      Previous value: -"Aspect mode: the part to keep: center (default), north, south, east, west, northwest, northeast, southwest or southeast."New value: +"Aspect crop anchor."
    • changedInput schema / properties / height / description
      Previous value: -"Box mode: crop height in pixels."New value: +"Box height in px."
    • changedInput schema / properties / left / description
      Previous value: -"Box mode: left edge in pixels (give left, top, width and height together, or aspect)."New value: +"Box: left in px. Use left, top, width and height, or aspect."
    • changedInput schema / properties / top / description
      Previous value: -"Box mode: top edge in pixels."New value: +"Box: top in px."
    • changedInput schema / properties / width / description
      Previous value: -"Box mode: crop width in pixels."New value: +"Box width in px."
  2. Changed32 schema fields changed
    • removedInput schema / properties / aspect / default
      Removed value: -null
    • removedInput schema / properties / aspect / title
      Removed value: -"Aspect"
    • removedInput schema / properties / auto_orient / title
      Removed value: -"Auto Orient"
    • removedInput schema / properties / format / default
      Removed value: -null
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / gravity / title
      Removed value: -"Gravity"
    • removedInput schema / properties / height / default
      Removed value: -null
    • changedInput schema / properties / height / description
      Previous value: -"Box mode: crop height in pixels (1-32768)."New value: +"Box mode: crop height in pixels."
    • removedInput schema / properties / height / title
      Removed value: -"Height"
    • removedInput schema / properties / image_base64 / default
      Removed value: -null
    • removedInput schema / properties / image_base64 / title
      Removed value: -"Image Base64"
    • removedInput schema / properties / left / default
      Removed value: -null
    • removedInput schema / properties / left / title
      Removed value: -"Left"
    • removedInput schema / properties / output / title
      Removed value: -"Output"
    • removedInput schema / properties / quality / default
      Removed value: -null
    • removedInput schema / properties / quality / title
      Removed value: -"Quality"
    • removedInput schema / properties / top / default
      Removed value: -null
    • removedInput schema / properties / top / title
      Removed value: -"Top"
    • removedInput schema / properties / url / default
      Removed value: -null
    • removedInput schema / properties / url / title
      Removed value: -"Url"
    • removedInput schema / properties / width / default
      Removed value: -null
    • changedInput schema / properties / width / description
      Previous value: -"Box mode: crop width in pixels (1-32768)."New value: +"Box mode: crop width in pixels."
    • removedInput schema / properties / width / title
      Removed value: -"Width"
    • removedInput schema / title
      Removed value: -"image_cropArguments"
    • removedOutput schema / properties / box / properties
      Removed value: -{
      -  "height": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "left": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "top": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "width": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / bytes / description
      Removed value: -"Bytes."
    • removedOutput schema / properties / content_type / description
      Removed value: -"MIME type."
    • removedOutput schema / properties / expires_at / description
      Removed value: -"UTC expiry."
    • removedOutput schema / properties / input / properties
      Removed value: -{
      -  "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"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / notes / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / sha256 / description
      Removed value: -"SHA-256."
    • removedOutput schema / properties / url / description
      Removed value: -"Public link."
  3. Changed6 schema fields changed
    • changedInput schema / properties / output / description
      Previous value: -"base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."New value: +"base64 (default): inline. url: stored for 24 hours; link, metadata."
    • addedOutput schema / properties / bytes / description
      Added value: +"Bytes."
    • addedOutput schema / properties / content_type / description
      Added value: +"MIME type."
    • addedOutput schema / properties / expires_at / description
      Added value: +"UTC expiry."
    • addedOutput schema / properties / sha256 / description
      Added value: +"SHA-256."
    • addedOutput schema / properties / url / description
      Added value: +"Public link."
  4. Changed4 schema fields changed
    • addedInput schema / properties / output
      Added value: +{
      +  "default": "base64",
      +  "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window.",
      +  "enum": [
      +    "base64",
      +    "url"
      +  ],
      +  "title": "Output",
      +  "type": "string"
      +}
    • addedOutput schema / properties / expires_at
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sha256
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / url
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  5. 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"
      +}
  6. Added

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare safety hints (readOnlyHint=false, destructiveHint=false, idempotentHint=true, openWorldHint=true); the description goes well beyond them with concrete failure behavior (422 `crop_out_of_bounds` on out-of-bounds crops, uncharged 413 above 15 MB/50 MP), the 40 MP input ceiling, supported input formats, and the fact that re-encoding strips EXIF/GPS/XMP/IPTC. It also discloses privacy and cost traits an agent cannot infer from any structured field: inputs are not logged, results persist for 24 h only with `output`="url", pricing is USD 0.002 with 3 free calls per IP per UTC day, and typical latency is 0.5-2 s.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core action and the sibling routing before the operational details, with no filler sentences. The density is high, though, and the pricing/free-tier/docs-link tail reads as boilerplate that an agent rarely needs to select or invoke the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, zero-required tool with a large input surface, the description covers the selection decision, mode semantics, error codes, size and format limits, cost, and privacy retention. With an output schema present, return-value shape is correctly omitted, leaving no material gap for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so each of the 12 parameters already documents itself, and the description largely restates schema facts (format list, aspect/gravity pairing, 24 h URL retention). The one genuine addition is that `auto_orient=false` uses stored axes rather than applying EXIF orientation, which sharpens the default-on behavior in the schema. Baseline 3 is appropriate when the schema carries this much weight.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence pairs a specific verb and resource ("Crop an image") with the two supported modes ("a box or an aspect ratio"), and it names the sibling it is not ("To scale instead use image_resize"). An agent can separate this from image_resize, image_thumbnail and pdf_crop without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit routing rule for the most likely confusion (scaling goes to image_resize) and clarifies the box-versus-aspect mode split, which the schema only hints at. It stops short of naming when not to crop at all (e.g. thumbnail or watermark workflows), so usage guidance is clear context rather than a full when/when-not decision table.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources