Skip to main content
Glama

imagepeek: rotate or flip an image

image_rotate
Idempotent

imagepeek: Rotate or flip an image. To change the format use image_convert. Returns the image rotated clockwise by angle (multiples of 90 are lossless transposes; other angles are bicubic, expanded by default, corners filled with background) and/or flipped (horizontal, vertical, both). 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 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-rotate-api.html

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
flipNoMirror after rotating: none (default), horizontal, vertical or both.none
angleNoDegrees, clockwise.
expandNoGrow the canvas to hold the whole rotated image (default true); false keeps the size and clips the corners.
formatNoOutput format (default: the input's; ICO in, PNG out).
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64
qualityNoEncoder quality 1-100 (lossy formats).
backgroundNoFill for uncovered corners: #rrggbb[aa] or transparent (default transparent, or white without alpha).
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
urlNoPublic link.
flipNo
angleNo
bytesNoBytes.
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
inputNo
notesNo
widthNo
formatNo
heightNo
sha256NoSHA-256.
sourceNo
final_urlNo
operationNo
expires_atNoUTC expiry.
source_urlNo
data_base64No
content_typeNoMIME type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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"
      +  ]
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / background / description
      Added value: +"Fill for uncovered corners: #rrggbb[aa] or transparent (default transparent, or white without alpha)."
    • addedInput schema / properties / expand / description
      Added value: +"Grow the canvas to hold the whole rotated image (default true); false keeps the size and clips the corners."
    • addedInput schema / properties / flip / description
      Added value: +"Mirror after rotating: none (default), horizontal, vertical or both."
    • 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."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "angle": {
      +      "type": [
      +        "number",
      +        "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"
      +      ]
      +    },
      +    "flip": {
      +      "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"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes far beyond the annotations (which only cover safety/idempotency): lossless transposes at multiples of 90 vs bicubic otherwise, default expansion and corner fill, EXIF/GPS/XMP/IPTC stripping, 40 MP input and 15 MB/50 MP output limits with 'not charged' notes, 413 behavior, no logging, 24 h retention for url output, latency and price. That is exactly the missing context an agent needs to avoid failed or expensive calls.

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?

Front-loaded with purpose and the key alternative, then dense operational facts with no filler. The rotation sentence is long and clause-heavy, packing expand/background/format behavior into one block, but every clause carries information.

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?

With an output schema present, return structure is covered elsewhere, and the description still supplies limits, cost, retention and format support. For a 10-parameter image transform with no required params, nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantic detail the schema lacks: 90-degree multiples are lossless while other angles are bicubic and expand the canvas with `background` fill, and flip is applied after rotation. It also clarifies the default format inheritance (ICO in, PNG out) that the schema states only tersely.

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?

States a specific verb pair and resource: 'Rotate or flip an image', and immediately names the sibling that handles a different concern ('To change the format use image_convert'). An agent can distinguish it from image_convert, image_crop and image_resize 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?

Explicitly routes format changes to image_convert, which is the most likely confusion among siblings. It also states the refusal conditions (unsupported formats, >40 MP) that route an agent away. It does not mention crop or resize boundaries, so it stops short of full when/when-not coverage.

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