Skip to main content
Glama

Optimize the images on a website

optimize_website

Start at one public web page, follow its links to the other pages on the same host, find every image they reference (img, srcset, picture, lazy-load attributes, inline CSS backgrounds, social images, icons), convert them to WebP and return a report: the pages scanned, each image's size before and after and the pages that use it, a download URL per image, zip_url for everything, and replacements mapping each original URL to its new file. To apply it to a codebase: download and unpack the ZIP, put the files from images/ next to the originals, then change each reference per replacements (or wrap it in a element with the WebP as and the original as the fallback). The free plan scans up to 5 pages and 100 images per call, Pro up to 50 pages and 500 images. A large site can take minutes: if the result is not ready the call returns a job_id to pass to get_website_report.

Input Schema

NameRequiredDescriptionDefault
urlYesAddress to start from, e.g. https://example.com
qualityNoWebP quality, default 80.
max_pagesNoScan at most this many pages. Default: the plan's limit. Use 1 for a single page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it discloses plan-based rate/scale limits (5 pages/100 images free, 50/500 Pro), the fact that large sites return a job_id instead of a result, and that the tool returns files rather than mutating the site. Return payload fields (zip_url, replacements, per-image sizes/download URLs) are spelled out.

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?

Front-loaded with the primary action and scope, then progressively adds output format, application workflow, and limits. Dense and generally earning its length, though the opening sentence is a long run-on and the deployment recipe could be trimmed.

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?

No output schema exists, so the description must describe return values — and it does, naming the report contents, zip_url, and replacements mapping. Combined with the async job_id path and plan limits, an agent has everything needed to call and handle this tool.

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; the description adds real context by quantifying the plan caps that determine the default max_pages value. It says nothing about the quality parameter beyond what the schema documents, so it is not a 5.

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 specific verb chain (crawl → discover images → convert to WebP) and the exact resource (all images on a public site), with the output artifact named. It is clearly distinguishable from siblings such as convert_image (single file) and list_website_assets (listing only).

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?

Explains the use case concretely (start at one page, follow same-host links) and gives the downstream workflow for applying results to a codebase, plus the async escape hatch via get_website_report. It lacks explicit 'when not to use' or named alternatives, so it stops short of a 5.

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