Skip to main content
Glama

Make WebP or AVIF copies of a site's images

convert_images

Make WebP (or AVIF) copies of the JPEG and PNG images in a site's upload folders, next to each original as .webp, with the encoder the server has (cwebp, avifenc, ImageMagick or vips; the answer names it, or says what to install). Runs as the site's owner in the background: follow with job_output, the last line is the summary (converted, already had a copy, no gain, MB before and after). Originals are never changed, and a copy that is not smaller is removed. dry_run true only counts. Serving the copies is separate: nginx needs a map on the Accept header and try_files $uri$webp_suffix (add_header Vary Accept); Apache a RewriteCond on HTTP_ACCEPT; WordPress and Magento can also serve them through their own image settings. Tell the user that before converting, and run it again later for new uploads (existing copies are skipped).

Input Schema

NameRequiredDescriptionDefault
siteNoSite root folder, like /var/www/shop, or one of the site's domains. Optional when the server has one site (see list_sites).
formatNoDefault webp (every browser; AVIF is smaller but slower to make).
serverNoServer name or id. Optional when the account has one server.
dry_runNo
foldersNoFolders relative to the site root; default: the site's upload folders (wp-content/uploads, pub/media, ...).
qualityNo1 to 100; default 82 for WebP, 55 for AVIF.
max_filesNoStop after this many conversions (default and most 20000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only give the broad profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true); the description adds the details that matter: runs as the site's owner in the background, originals are never changed, non-smaller copies are removed, already-converted files are skipped, and the job summary's contents. It also discloses environment dependence (encoder availability, 'or says what to install').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, but the remainder is a single dense block with heavy parenthetical nesting that is hard to scan. The serving-configuration paragraph (nginx map, Apache RewriteCond, platform settings) is legitimately useful guidance but would read far better as separated clauses or bullets.

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?

There is no output schema, and the description compensates fully by telling the agent how to retrieve results (follow with job_output) and what the final line contains (converted, already had a copy, no gain, MB before/after). Background execution, idempotent re-runs and the serving caveat are all covered.

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 high (86%) and already documents site, format, folders, quality and max_files, so the baseline is 3. The description adds real semantics on top: 'dry_run true only counts' (a mode the schema never explains) and the WebP-vs-AVIF tradeoff reasoning, plus the default folder set in prose.

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?

States a precise verb and resource ('Make WebP (or AVIF) copies of the JPEG and PNG images in a site's upload folders'), names the output artifact convention (<file>.webp) and the encoders used. It is unmistakable against siblings like job_output, which it positions itself as a precursor to.

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?

Gives explicit when-to-run ('Tell the user that before converting ... and run it again later for new uploads (existing copies are skipped)'), when-to-use-adjacent alternatives (nginx map/try_files, Apache RewriteCond, WordPress/Magento image settings for serving), and the dry_run preview mode. Nothing about invocation timing is left to inference.

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.

Resources