Context
A DevForge MCP audit (PRP 003, release v2.5.1) confirmed that the optimize_images handler reads several user-supplied input fields that are silently dropped because the corresponding OptimizeJob protocol struct does not have matching fields.
What's missing in dpf
OptimizeJob currently has inputs, quality, and a boolean also_webp. The following user-supplied fields are dropped:
max_width: int — clamp output width (pixels, 0 = no clamp)
max_height: int — clamp output height (pixels, 0 = no clamp)
- A real multi-format output list — the current
also_webp: bool only models a single extra format. Callers asking for avif, jpg, or png get silently ignored.
Suggested replacement:
- Drop
also_webp: bool
- Add
formats: []string — desired output formats (e.g. [''webp'', ''avif'', ''jpg''])
This is a small breaking change to the dpf protocol. Recommend bumping the protocol version so DevForge can detect compatibility.
What DevForge will do once this lands
In internal/tools/optimize_images.go, the handler reads input.MaxWidth, input.MaxHeight, and input.Formats (already a []string on the Go side) but only forwards also_webp today. After this lands, all three flow through to dpf, and the description for optimize_images in cmd/devforge-mcp/main.go gets the qualifier removed.
Impact
Today, callers requesting max_width=1920 get the original dimensions; callers requesting AVIF get WebP-or-nothing. After this lands, dpf honors the user's full optimization spec.
References
- DevForge commits:
3d1884b, 5235038
- DevForge release: v2.5.1
- DevForge memory:
prp/003-tools-efficiency-and-reuse/preexisting-bugs
Context
A DevForge MCP audit (PRP 003, release v2.5.1) confirmed that the
optimize_imageshandler reads several user-supplied input fields that are silently dropped because the correspondingOptimizeJobprotocol struct does not have matching fields.What's missing in dpf
OptimizeJobcurrently hasinputs,quality, and a booleanalso_webp. The following user-supplied fields are dropped:max_width: int— clamp output width (pixels, 0 = no clamp)max_height: int— clamp output height (pixels, 0 = no clamp)also_webp: boolonly models a single extra format. Callers asking foravif,jpg, orpngget silently ignored.Suggested replacement:
also_webp: boolformats: []string— desired output formats (e.g.[''webp'', ''avif'', ''jpg''])This is a small breaking change to the dpf protocol. Recommend bumping the protocol version so DevForge can detect compatibility.
What DevForge will do once this lands
In
internal/tools/optimize_images.go, the handler readsinput.MaxWidth,input.MaxHeight, andinput.Formats(already a[]stringon the Go side) but only forwardsalso_webptoday. After this lands, all three flow through to dpf, and the description foroptimize_imagesincmd/devforge-mcp/main.gogets the qualifier removed.Impact
Today, callers requesting
max_width=1920get the original dimensions; callers requesting AVIF get WebP-or-nothing. After this lands, dpf honors the user's full optimization spec.References
3d1884b,5235038prp/003-tools-efficiency-and-reuse/preexisting-bugs