Media
Преобразование файлов иконок ICO в формат WebP с современной компрессией и поддержкой прозрачности
Вызовите этот инструмент из своего кода на трёх языках.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/ico-to-webp' \
-F 'file=@/path/to/icoFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/ru/api/tools/ico-to-webp' \
-F 'icoFile=/path/to/file.ext' \
-F 'width=0' \
-F 'height=0' \
-F 'extractSize=auto' \
-F 'quality=80' \
-F 'lossless=false' \
-F 'effort=4' \
-F 'method=4' \
-F 'preserveTransparency=true' \
-F 'backgroundColor='Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/ico-to-webp| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| icoFile | fileнужна загрузка | Да | — |
| width | number | Нет | Output width in pixels (optional) |
| height | number | Нет | Output height in pixels (optional) |
| extractSize | select | Нет | — |
| quality | range | Нет |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-ico-to-webp": {
"name": "ico-to-webp",
"description": "Преобразование файлов иконок ICO в формат WebP с современной компрессией и поддержкой прозрачности",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=ico-to-webp",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "ico-to-webp",
"arguments": {
"icoFile": "https://example.com/file.ext",
"width": 0,
"height": 0,
"extractSize": "auto",
"quality": 80,
"lossless": false,
"effort": 4,
"method": 4,
"preserveTransparency": true,
"backgroundColor": ""
}
}
}| WebP quality (1-100, higher = better quality) |
| lossless | checkbox | Нет | Use lossless compression for perfect quality |
| effort | range | Нет | CPU effort (0=fastest, 6=slowest/best compression) |
| method | range | Нет | Compression method (0=fastest, 6=slowest/smallest) |
| preserveTransparency | checkbox | Нет | Keep ICO transparency in output WebP |
| backgroundColor | color | Нет | Background color (if transparency is disabled) |
Файловый результат
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Вопросы или проблемы? Свяжитесь с [email protected]