Skip to main content
Glama

Resize an image for other platforms

create_variants

Reshape ONE image already in the media library into several platform canvases at once, and return the new asset ids: feed_portrait (1080×1350, 4:5), feed_square (1080×1080), landscape (1080×566, 1.91:1) and story (1080×1920, 9:16 — also what a reel or a TikTok photo wants). Cropping is saliency-based by default: sharp scores regions by saturation, luminance and skin tone and keeps the strongest, so an off-centre subject survives a 4:5 → 9:16 cut. Use crop="centre" for images composed around their middle (posters, screenshots, flat graphics), where a predictable crop beats a guessed one. fit="contain" pads instead of cropping — use it when nothing may be cut off at all. Images only; video is not re-encoded. The source image is left unchanged and every canvas is a new asset. Variants inherit the source’s alt text and folder, and asking for two formats with the same dimensions produces one file, not two. Typical use: upload once, call this with the formats the selected platforms want, then pass the right variant id per post.

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": {
      "mediaId": "<mediaId>",
      "formats": "<formats>"
    },
    "name": "create_variants"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNo'cover' crops to fill (default); 'contain' pads to fit
cropNo'smart' = saliency-based (default); 'centre' = predictable middle crop
formatsYesCanvases to produce
mediaIdYesSource image asset id (from list_media or upload_media)
workspaceIdNoWhich workspace to act in — an id from list_workspaces. Optional with a single workspace; REQUIRED once there are several, where guessing would mean posting one client's content to another client's accounts. Ask the user which one before publishing.

Output Schema

NameRequiredDescriptionDefault
sourceIdNo
variantsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give the generic non-readonly/non-destructive/idempotent-false profile; the description adds the facts that matter — the source image is never modified, every canvas is a brand-new asset, variants inherit alt text and folder, and two formats with identical dimensions dedupe to one file. These are non-obvious side effects an agent could not infer from the schema.

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?

The verb, scope, and return value are front-loaded in the first clause, and every subsequent sentence carries distinct information (formats, crop logic, fit, side effects). It is dense rather than bloated, though the em-dash parentheticals make it slower to scan than it needs to be for a 5-parameter tool.

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?

With an output schema present and full schema description coverage, the description supplies exactly the missing layer: behavioral side effects, format meanings, and the end-to-end workflow. Nothing an agent needs to call this correctly — or to avoid misusing it on video or expecting the source to change — is absent.

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 100%, so the baseline is 3, but the description goes beyond the terse enum descriptions by giving each format's dimensions and platform intent (story also serves reels and TikTok photos) and by explaining when each crop/fit mode is the right choice. Only workspaceId is left entirely to the schema, which already documents it well.

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 opening sentence names a specific verb and resource ('Reshape ONE image already in the media library into several platform canvases at once') and states the return value (new asset ids). It is clearly distinguished from siblings like upload_media/create_media_upload (source must already exist) and create_video ('video is not re-encoded').

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?

It gives explicit conditional guidance for both optional parameters: crop="centre" for posters/screenshots/flat graphics, fit="contain" when nothing may be cut off. It also closes with a workflow ('upload once, call this with the formats the selected platforms want, then pass the right variant id per post') and excludes video outright.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.