Skip to main content
Glama
apparelhub-mcp

apparelhub-mcp

Official

Fit a design to an aspect ratio

fit_aspect
Destructive

Reshape an existing design to any target aspect ratio using pad (letterbox, nothing cropped) or center-crop modes. Adapts square images to phone case, poster, mug, or banner print areas without using generation credits.

Instructions

Fit an EXISTING design image to a target aspect ratio without generating a new one. mode="pad" letterboxes it onto a background (keeps the whole design, nothing cropped); mode="crop" center-crops (trims the edges to fill the shape). QUOTA-FREE: this reshapes an existing image and does NOT consume an image-generation credit. Use to adapt a square design to a product's print area (e.g. a tall 9:16 for a phone case or poster, a wide 16:9 for a mug or banner). Returns a NEW design (image uuid + url). Note: for an AI-generated EXTENSION of the borders (outpainting) instead of a flat pad/crop, generate a new image with generate_image at the target size — that DOES use the image-generation quota.

[#9ca805]

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_uuid": "<image_uuid>",
      "aspect": "<aspect>",
      "mode": "<mode>"
    },
    "name": "fit_aspect"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYespad (default): letterbox onto a background, keeping the whole design (nothing lost). crop: center-crop to fill the shape, trimming the edges.pad
aspectYesTarget aspect ratio as "W:H". Common: 9:16 tall (phone cases, posters), 16:9 wide (mugs, banners), 1:1 square, 4:5 portrait.
workspaceNo
backgroundNoFill color for the padded bars as #RRGGBB (pad mode only; ignored for crop). Defaults to transparent/white on the platform when omitted.
image_uuidYesThe uuid of an existing design to reshape (from generate_image / list_my_designs).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.2

TDQS

A4.8/5.0
Behavior5/5

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

With annotations already flagging destructiveHint=true and openWorldHint=true, the description adds the facts an agent actually needs: the operation is quota-free, the source design is reshaped into a NEW design rather than mutated in place, and the return value is an image uuid plus url. It also clarifies the failure mode of each mode (pad keeps everything, crop trims edges).

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 key distinction and quota status, and nearly every clause carries decision-relevant information. It is a dense single paragraph with a stray trailing artifact ('[#9ca805]') and would scan better with the mode definitions broken out.

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?

For a mutation-style tool with no output schema, the description covers input provenance (uuid from generate_image / list_my_designs is in the schema), mode semantics, quota implications, and the return shape. An agent has everything needed to select and call it correctly.

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 coverage is already 80%, and the description adds real meaning on top by explaining the consequence of each mode value rather than just naming them. It does not mention the optional background color parameter, which is left entirely to the schema, so it stops short of full compensation.

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?

Names a specific verb and resource ('Fit an EXISTING design image to a target aspect ratio') and immediately differentiates itself from generate_image by stating it does not create a new image from scratch. The mode enumeration and target use cases make the operation unmistakable.

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

Usage Guidelines5/5

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

Gives concrete when-to-use scenarios (adapting a square design to a phone case at 9:16, a mug/banner at 16:9) and an explicit when-not-to-use alternative: use generate_image for outpainting an AI-generated border extension, with the caveat that it consumes quota. Pad vs crop selection criteria are spelled out.

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

Deploy Server

Other Tools