Skip to main content
Glama

transform_image

Resize images to specified canvas dimensions, adjust content fill proportion, and set background color for transparent or solid backgrounds.

Instructions

Transforms an image to the specified canvas dimensions with optional content proportion and background color.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYesOutput canvas width in pixels
formatNoOutput file format (default: png)png
heightYesOutput canvas height in pixels
qualityNoOutput compression quality, only applies to jpeg and webp (1 = lowest, 100 = highest, default: 95)
proportionNoHow much of the canvas the content fills (0.1–1.0, default: 1 = fills everything)
input_imageYesAbsolute path to the source image (accepts PNG, JPEG, WebP, TIFF, AVIF)
output_pathYesAbsolute path of the output file, including name and extension (e.g. /path/to/result.webp)
background_colorNoCanvas background color in hex (e.g. #ffffff). Omit for transparent background.
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It fails to explain how the transformation is applied (cropping, stretching, padding), how 'proportion' affects the layout, how 'background_color' interacts with transparency, or whether the source file is modified. These are significant undocumented behaviors for a tool with multiple options.

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 description is a single, front-loaded sentence with no filler or redundancy. It efficiently conveys the core purpose, though it could include a bit more detail without becoming verbose.

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

Completeness2/5

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

Given the tool's complexity (8 parameters, 4 required, multiple formats and options), the one-sentence description is insufficient. It does not describe the transformation result, output saving behavior, or how optional parameters interact. Without an output schema or annotations, users face many unknowns.

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?

The schema already provides detailed descriptions for all 8 parameters (100% coverage), so the description adds no extra semantic value. Its mention of 'content proportion' and 'background color' simply restates what the schema already says, without clarifying interactions or edge cases.

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 states 'Transforms an image to the specified canvas dimensions' using a specific verb and resource, clearly indicating a dimension-changing operation. It distinguishes from siblings (generate_expo_icons, convert_svg) by focusing on canvas sizing rather than icon generation or SVG conversion. However, 'transforms' is somewhat generic and could be more specific (e.g., resize, pad).

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 description implies the tool is used when an image needs to be fitted to a specific canvas size, but it does not explicitly state when to use it over sibling tools or provide exclusions. No alternatives or conditions are mentioned, leaving usage guidance implied rather than explicit.

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

Install Server

Other Tools

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/elber-code/expo-assets-mcp'

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