Skip to main content
Glama

reframe_exr

Adjust an EXR's aspect ratio to a target ratio by expanding the canvas with black borders or cropping pixels, with anchor control for the fixed edge.

Instructions

Adjust an EXR's aspect ratio by expanding (adding black borders) or cropping.

Expand mode: adds zero-value padding on one axis so the image reaches target_ratio.
Crop mode: removes pixels from one axis so the image reaches target_ratio.

The anchor controls which side stays fixed:
- When width changes (horizontal adjustment): left / center / right
- When height changes (vertical adjustment): top / center / bottom

Every part of a multi-part EXR is reframed the same way, since all parts must share
one displayWindow. Deep parts, subsampled channels, and parts whose dataWindow differs
from the displayWindow (overscan) are not supported. Output file must not be the same file as input.
For tiled images, the result lists parts whose lower-resolution tile levels were discarded.

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": {
      "input_path": "<input_path>",
      "output_path": "<output_path>",
      "target_ratio": "<target_ratio>"
    },
    "name": "reframe_exr"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo'expand' adds black borders to reach target ratio; 'crop' removes pixels from edgesexpand
anchorNoReference point for the operation. Default 'center'. When width changes: 'left', 'center', 'right'. When height changes: 'top', 'center', 'bottom'.center
input_pathYesAbsolute path to the source EXR file
part_indexNoRemoved parameter. Omit it to reframe every part.
output_pathYesAbsolute path for the output EXR file (must differ from input)
target_ratioYesTarget aspect ratio as width/height (e.g. 1.7778 for 16:9, 2.35, 1.85)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.1
    • addedInput schema / properties / part_index / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / part_index / default
      Previous value: -0New value: +null
    • addedInput schema / properties / part_index / deprecated
      Added value: +true
    • changedInput schema / properties / part_index / description
      Previous value: -"Index of the part to reframe (0-based). Other parts are written unchanged."New value: +"Removed parameter. Omit it to reframe every part."
    • removedInput schema / properties / part_index / minimum
      Removed value: -0
    • removedInput schema / properties / part_index / type
      Removed value: -"integer"
  2. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses what is written (zero-value padding vs pixel removal), which inputs are unsupported, that output must differ from input, and that tiled results report discarded tile levels. It stops short of stating overwrite behavior for an existing output file or whether headers/displayWindow metadata are preserved.

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 the core operation, then broken into short labeled paragraphs for modes, anchors, and constraints, which is easy to scan. Some content duplicates the schema descriptions (expand/crop definitions, anchor options), a minor redundancy rather than a real cost.

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?

For a mutation tool with six parameters, no annotations and no output schema, the description supplies the important operational limits and hints at the result (discarded tile levels). What is missing is the general shape of the return value and failure behavior, which matters somewhat given no output schema exists.

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 coverage is 100%, so mode, anchor, target_ratio and the deprecated part_index are already documented in the input schema. The description mainly restates the mode definitions and anchor rules, adding only the useful constraint that all parts are reframed uniformly, which implicitly explains why part_index is deprecated. Baseline 3 is appropriate when the schema does the heavy lifting.

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 and resource ('Adjust an EXR's aspect ratio') and immediately defines the two operating modes. This is clearly distinct from every listed sibling, which are all inspection/metadata tools, so an agent can tell it is the only mutating reframe tool without opening a 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?

Gives clear context for choosing between expand and crop and explains how anchor interacts with the changed axis, plus explicit exclusions (deep parts, subsampled channels, overscan, same input/output path). It does not name an alternative tool, but no sibling performs reframing, so there is no real ambiguity to resolve.

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