Development
Build complete <picture> markup with art-directed crops: per-breakpoint <source media> elements, 1x/2x density candidates or {w}-template width descriptors, optional AVIF/WebP format layers, sizes handling, CLS-safe width/height, plus HTML and JSX flavors with spec-based lint notes.
Call this tool from your code in three languages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/responsive-picture-srcset-art-direction-builder' \
-H 'Content-Type: application/json' \
-d '{"filename":"variantImages.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/responsive-picture-srcset-art-direction-builder' \
-F 'sources=768 /img/hero-mid.jpg
1280 /img/hero-wide.jpg' \
-F 'variantImages=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'descriptorMode=density' \
-F 'densities=1x,2x' \
-F 'sizesAttr=(min-width: 1024px) 960px, 100vw' \
-F 'fallbackUrl=/img/hero-mobile.jpg' \
-F 'altText=Fresh sourdough loaves on a marble counter' \
-F 'formatLayer=none' \
-F 'flavor=html' \
-F 'lazyAttrs=true'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/responsive-picture-srcset-art-direction-builder| Name | Type | Required | Description |
|---|---|---|---|
| sources | textarea | No | — |
| variantImages | fileupload required | No | — |
| descriptorMode | select | Yes | — |
| densities | text | No | — |
| sizesAttr | text | No | — |
| fallbackUrl | text | No | — |
| altText | text | No | — |
| formatLayer | select | Yes | — |
| flavor | select | Yes | — |
| lazyAttrs | checkbox | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-responsive-picture-srcset-art-direction-builder": {
"name": "responsive-picture-srcset-art-direction-builder",
"description": "Build complete <picture> markup with art-directed crops: per-breakpoint <source media> elements, 1x/2x density candidates or {w}-template width descriptors, optional AVIF/WebP format layers, sizes handling, CLS-safe width/height, plus HTML and JSX flavors with spec-based lint notes.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=responsive-picture-srcset-art-direction-builder",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "responsive-picture-srcset-art-direction-builder",
"arguments": {
"sources": "768 /img/hero-mid.jpg\n1280 /img/hero-wide.jpg",
"variantImages": "https://example.com/file.ext",
"descriptorMode": "density",
"densities": "1x,2x",
"sizesAttr": "(min-width: 1024px) 960px, 100vw",
"fallbackUrl": "/img/hero-mobile.jpg",
"altText": "Fresh sourdough loaves on a marble counter",
"formatLayer": "none",
"flavor": "html",
"lazyAttrs": true
}
}
}Questions or issues? Contact [email protected]