Skip to main content
Glama

prepare_for_web

Resize local images without enlargement, strip EXIF metadata, and convert them to WebP, AVIF, JPEG, or PNG to reduce file size for web publishing.

Instructions

Resize (without enlargement), strip EXIF metadata, and convert a local image to WebP, AVIF, JPEG, or PNG with file size savings metrics.

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": {
      "imagePath": "<imagePath>"
    },
    "name": "prepare_for_web"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoTarget web format.webp
qualityNoEncoder quality (1-100).
maxWidthNoMaximum output width in pixels.
imagePathYesPath to the local source image.
maxHeightNoMaximum output height in pixels.
overwriteNoAllow overwriting an existing output file.
outputPathNoOptional output path (defaults to <name>_web.<ext>).
keepMetadataNoKeep EXIF/ICC metadata instead of stripping.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description does real work: it discloses the no-enlargement constraint, that EXIF is stripped by default, and that size savings metrics are returned. However, it never states that a file is written to disk, how output naming/overwrite behaves, or what the returned metrics look like, leaving meaningful behavioral gaps for a file-mutating tool.

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?

A single tight sentence that front-loads the three operations and ends with the payoff (size savings metrics). No filler or redundancy.

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?

For an 8-parameter tool with full schema descriptions and no output schema, the description covers purpose, the key non-obvious behavior (no enlargement), metadata handling, and the existence of return metrics. Only the on-disk write behavior and return shape detail are left implicit.

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 adds genuine meaning: the 'without enlargement' clause explains that maxWidth/maxHeight act as caps and will not upscale, which the schema does not say. The format list also maps cleanly onto the enum.

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?

Specific verbs and resource: resize, strip EXIF, convert a local image, with the target formats enumerated. The parenthetical '(without enlargement)' implicitly distinguishes it from the upscale_pixel_art sibling, though no sibling is named explicitly.

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?

Usage is implied by the name and the 'prepare for web' framing rather than stated. There is no explicit when-to-use vs when-not-to-use guidance and no alternative tool is named for cases like upscaling or quality diagnosis.

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