Skip to main content
Glama

Produce responsive web variants

image_optimize_web

Convert a source image into web-ready variants at multiple widths, with optional file-size limits, a blurred placeholder, and a ready-to-use srcset.

Instructions

Turn one source image into a set of web-ready variants at several widths, each optionally constrained to a maximum file size, plus a tiny blurred placeholder and a ready-to-paste srcset. This is the one call to use for 'make this web-ready'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNohttp(s) URL to fetch.
pathNoPath to the source image.
widthsNoTarget widths, e.g. [480, 960, 1440]. Defaults to a sensible ladder.
qualityNoStarting quality for each variant.
base64_dataNoInline base64 source image.
output_formatNoOutput codec: webp, avif or jpeg.webp
strip_metadataNoStrip metadata from every variant.
create_placeholderNoAlso produce a tiny blurred placeholder and its base64 data URI.
max_bytes_per_variantNoPer-variant byte ceiling; quality is searched down per width to fit.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
inputNoSummary of the source image, when one was read.
notesNo
stepsNo
metricsNoOperation-specific measurements (e.g. comparison scores).
outputsNo
operationYesTool that produced this result.
sizeChangeNo
inlineImageIncludedNoTrue when an image block accompanies this result for vision-capable clients.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It does disclose key behaviors: it produces multiple variants, optionally constrains file size, creates a placeholder, and generates a srcset. However, it doesn't mention whether the source is deleted, whether it fetches remote URLs, or any side effects. The description adds meaningful behavioral context but leaves some operational details undisclosed.

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?

Two sentences with no filler. The first sentence front-loads the core function and outputs; the second sentence gives a memorable usage rule. Every word earns its place.

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

Completeness4/5

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

The tool has 9 parameters, an output schema, and no annotations. The description covers the high-level purpose and key outputs, and the output schema presumably documents return values. It doesn't mention input source options (url/path/base64_data) or default behaviors, but the schema covers those. For a complex tool, the description is reasonably complete, though it could note that it accepts multiple source types.

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 100%, so the schema already documents all 9 parameters. The description adds a little context by mentioning 'several widths', 'maximum file size', and 'srcset', which maps to widths, max_bytes_per_variant, and output. But it doesn't explain parameter interactions (e.g., how quality relates to max_bytes_per_variant) beyond what the schema already says. Baseline 3 is appropriate.

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 states a specific verb ('Turn one source image into a set of web-ready variants'), names the concrete outputs (variants at several widths, blurred placeholder, srcset), and explicitly positions it as the go-to call for 'make this web-ready'. This clearly distinguishes it from siblings like image_resize or image_convert.

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

Usage Guidelines4/5

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

The description gives a clear usage signal: 'This is the one call to use for "make this web-ready"'. It implies this tool is preferred over more basic siblings for responsive web output, though it doesn't explicitly name alternatives or state when not to use it. The context is clear enough for an agent to select it appropriately.

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