Skip to main content
Glama
piephai
by piephai

optimize_image

Resize, convert, and enhance images from file paths or URLs with options for rotation, cropping, blur, and quality adjustment.

Instructions

Optimize an image from a file path or URL with various transformation options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fitNoHow to fit the image when resizing
blurNoBlur sigma value (0.3 to 1000)
flipNoFlip the image vertically
flopNoFlop the image horizontally
inputYesInput image path or URL
widthNoTarget width in pixels
formatNoOutput format
heightNoTarget height in pixels
outputYesOutput file path
rotateNoRotation angle in degrees
qualityNoQuality (1-100) for lossy formats
sharpenNoApply sharpening
positionNoPosition when fit is cover or contain (e.g., "center", "top", "right bottom")
grayscaleNoConvert to grayscale
normalizeNoNormalize image contrast
backgroundNoBackground color when using contain (e.g., "#ffffff", "transparent")
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits but does not. It only states that it optimizes an image; no mention of side effects (e.g., overwriting output files), return values, supported input formats, or behavior when given a URL. This lack of transparency could lead to incorrect usage assumptions.

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 description is a single, front-loaded sentence that effectively communicates the core purpose without any filler or extraneous detail. It is appropriately concise for a tool with a rich schema.

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 (16 parameters) and the absence of an output schema, the description is insufficiently complete. It does not explain what the tool returns (e.g., success status, output path), how parameters like fit and position interact, or any default behaviors, making it hard for an agent to predict the tool's behavior without external knowledge.

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 input schema provides complete descriptions for all 16 parameters, including enums, ranges, and examples, so the schema carries the burden. The tool description adds no extra semantic meaning beyond what is already in the schema, aligning with the baseline of 3.

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 clearly identifies the tool's function as optimizing an image from a file path or URL, with a nod to transformation options. It distinguishes itself from siblings by focusing on single-image optimization and accepting both file paths and URLs, but the term 'optimize' is broad and leaves the exact scope (resize, compress, convert) ambiguous.

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

Usage Guidelines2/5

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

The description provides no guidance on when this tool should be used versus alternatives like batch_optimize, auto_crop, or smart_crop. It does not mention exclusions or recommend the tool for specific scenarios, leaving the agent to infer from the name alone.

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/piephai/mcp-image-optimizer'

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