Skip to main content
Glama
gimp-mcp-studio
by Onru-Labs

scale_to_fit

Scale an image to fit within specified maximum width and height while preserving its aspect ratio.

Instructions

Scale an image to fit within a bounding box, preserving aspect ratio.

Parameters:

  • max_width: Maximum allowed width in pixels

  • max_height: Maximum allowed height in pixels

  • interpolation: "cubic" (default), "linear", "none"

  • image_index: Target image index (default 0)

Returns: {status, width, height} — final dimensions after scaling

Input Schema

NameRequiredDescriptionDefault
max_widthYes
max_heightYes
image_indexNo
interpolationNocubic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden and does disclose the key behavioral traits: aspect ratio is preserved and the final dimensions are returned. It does not state whether the operation mutates the image in place, whether upscaling is allowed when the source is smaller than the box, or what happens when only one dimension is binding, which are meaningful gaps for a mutation tool.

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

Conciseness5/5

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

The one-line purpose is front-loaded, then a tight parameter block, then a return-shape line. Nothing is redundant and the structure lets an agent scan purpose, inputs, and output in order.

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?

With no output schema, the inline "Returns: {status, width, height}" line is genuinely necessary and included, and the default values for interpolation and image_index are surfaced. The remaining gap is in-place-vs-copy semantics and upscale behavior, which matter for a 4-parameter mutating image tool.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does: it glosses all four parameters and, critically, enumerates the accepted interpolation values ("cubic" default, "linear", "none") which the schema does not express as an enum. It stops short of stating constraints on max_width/max_height, such as acceptable ranges or mutual interaction.

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?

The description gives a specific verb and resource ("Scale an image") plus the distinguishing constraint of fitting within a bounding box while preserving aspect ratio, which separates it conceptually from plain scale_image or resize_canvas. It never names a sibling explicitly, so an agent still has to infer the boundary from sibling names alone.

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

Usage Guidelines3/5

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

Usage is only implied: the "fit within a bounding box" phrasing suggests this is the right choice when target maximums are known, but there is no explicit when-to-use, when-not-to-use, or pointer to an alternative such as scale_image or batch_resize. An agent must derive the routing decision itself.

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