Skip to main content
Glama

Rotate image

rotate_image

Rotate a local image by any angle (clockwise for positive values), optionally auto-orient EXIF first, and save the result.

Instructions

Rotate a local image by an arbitrary angle (clockwise for positive values), optionally applying EXIF auto-orientation first, and save the result.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image": "<image>"
    },
    "name": "rotate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
angleNoRotation angle in degrees, clockwise for positive values. If omitted, only EXIF auto-orientation is applied.
imageYesAbsolute path to a local image on the machine running this MCP server.
qualityNoEncoder quality (1-100). Applies to JPEG, WebP, AVIF and TIFF output.
losslessNoUse lossless encoding where supported (WebP and AVIF).
file_nameNoOptional base file name; path separators are not allowed. The actual image format determines the extension. When multiple outputs are produced, -1, -2, ... suffixes are appended. Existing files are never overwritten.
backgroundNoCSS color used as the background, for example #ffffff or transparent.
output_dirNoAbsolute directory where the output file is saved. Defaults to IMG_OUTPUT_DIR, or ~/img-output. The directory is created automatically.
auto_orientNoApply EXIF orientation before rotating. Defaults to true.
output_formatNoOutput image format. PNG, JPEG, WebP, AVIF, TIFF and GIF are supported.
compression_levelNoPNG compression level (0-9); higher is smaller and slower.

Output Schema

NameRequiredDescriptionDefault
imageYes
sourceYes
detailsNo
operationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare it is a non-destructive, non-read-only, non-idempotent local write. The description adds the clockwise-positive convention and the optional EXIF auto-orient pass, which annotations cannot convey, but says nothing about where files land, overwrite protection, or that repeated runs create new files — behavior an agent needs before invoking a save operation with 10 parameters.

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?

A single well-formed sentence with the action front-loaded and no filler. Slightly dense with three clauses stacked, but nothing is wasted.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the schema fully documents all 10 parameters. The only real omission is routing guidance among the many image-processing siblings, which is a usage gap rather than a completeness gap.

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 every parameter including angle, auto_orient, and overwrite behavior is already documented in the schema. The description's angle convention repeats the schema's own wording, adding no meaning beyond it, so the baseline 3 applies.

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

Purpose4/5

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

Specific verb+resource ("Rotate a local image") with the scope qualifier "local" and the sign convention for angle. It clearly separates this from generate/convert siblings, though it does not name any of them explicitly.

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

Usage Guidelines2/5

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

No statement of when to prefer this over crop_image, resize_image, or convert_image, and no prerequisites or exclusions. The only contextual cue is that the result is saved to disk, which the agent could infer from other tools equally.

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