Skip to main content
Glama

fit_to_spec

Adjusts an image to meet dimension specifications: crops for orientation, upscales to minimum, and downscales to maximum size in a single pass, preserving framing when possible.

Instructions

Transform an image until it satisfies a dimension specification.

Crops to fix the orientation if required, upscales to reach a minimum size, downscales to respect a maximum, and optionally applies a light touch-up -- all in one pass, so the JPEG is re-encoded only once. Images already satisfying a constraint keep their framing.

Example: to produce a square image at least 1000x1000, pass orientation="square" with min_width=1000 and min_height=1000.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anchorNocenter
backendNo
qualityNo
upscaleNo
contrastNo
max_widthNo
min_widthNo
brightnessNo
input_pathYes
max_heightNo
min_heightNo
orientationNoany
output_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden, and it does well: it discloses cropping, upscaling, downscaling, optional touch-up, single re-encode of JPEG, and preservation of already-compliant framing. It leaves some specifics unstated (e.g., overwrite behavior, failure conditions, handling of non-JPEG inputs), which prevents a 5.

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?

Three short paragraphs, all informative: the first sentence states the purpose, the second explains the mechanism, and the example grounds the parameters. No filler or repetition of schema field names, and the key operations are front-loaded.

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

Completeness3/5

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

For a 13-parameter tool with no annotations and no schema descriptions, the description covers the core workflow adequately but omits enough optional-parameter semantics to be fully self-contained. The presence of an output schema means return values need not be described, but the parameter gaps and lack of sibling differentiation leave clear holes.

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 0%, so the description must explain parameters; it gives meaning to orientation, min_width, min_height, and the max constraints via the example and operation summary. However, many of the 13 parameters (anchor, backend, quality, upscale, contrast, brightness, max_width/max_height defaults) are not explained in the description or schema, leaving significant inference required.

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 description opens with a precise verb and resource: 'Transform an image until it satisfies a dimension specification,' then enumerates the exact operations (crop for orientation, upscale, downscale, optional touch-up) and gives a concrete square-image example. This clearly separates the tool from generic resize/crop siblings by emphasizing the all-in-one constraint-satisfaction behavior.

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?

The use case is implied clearly: call this tool when an image must meet dimension constraints (min/max width/height, orientation) in one pass. However, it never explicitly tells an agent when to prefer fit_to_spec over sibling tools like crop_to_aspect, resize_image, or process_image, nor states when not to use it.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Diterex/gimp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server