Responsive image planner
plan_responsive_imagesPlans responsive images. Pass breakpoints as min-viewport:width pairs such as 0:100vw, 768:50vw, 1200:600px (vw or px), and optionally dprs (default 1,2), sourceWidth (original pixel width, upscaled candidates are dropped), format (jpeg, webp, avif, png; default webp), aspect (16:9 or 1.5, adds a height for layout stability), urlPattern containing {w}, aboveFold (true adds fetchpriority high and no lazy loading), maxViewport (default 1920) and content (photo, graphic or noisy). Returns the srcset widths (thinned so neighbors differ by at least 18 percent, max 8), the sizes string, an tag, and a rough byte estimate from typical bits per pixel for the format. Estimates are within about 2x either way. It plans markup; it does not resize files.
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": {
"breakpoints": "<breakpoints>"
},
"name": "plan_responsive_images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dprs | No | Comma-separated DPRs, default `1,2`. | |
| aspect | No | Width:height such as 16:9. | |
| format | No | ||
| content | No | ||
| aboveFold | No | ||
| urlPattern | No | URL with {w}, e.g. /img/hero-{w}.webp | |
| breakpoints | Yes | Pairs like `0:100vw, 768:50vw, 1200:600px`. | |
| maxViewport | No | ||
| sourceWidth | No | Original image width in pixels. |