Design
Генерирует QR-коды из URL или текста с настраиваемым размером и цветами
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/qr-code-generator' \
-H 'Content-Type: application/json' \
-d '{"text":"Enter text, URL, or any content to encode in QR code","size":200,"errorCorrectionLevel":"M","margin":4,"color":"#000000","backgroundColor":"#FFFFFF","format":"png"}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/qr-code-generator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| text | textarea | Да | — |
| size | number | Нет | — |
| errorCorrectionLevel | select | Нет | — |
| margin | number | Нет | — |
| color | color | Нет | — |
| backgroundColor |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-qr-code-generator": {
"name": "qr-code-generator",
"description": "Генерирует QR-коды из URL или текста с настраиваемым размером и цветами",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=qr-code-generator",
"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": "qr-code-generator",
"arguments": {
"text": "Enter text, URL, or any content to encode in QR code",
"size": 200,
"errorCorrectionLevel": "M",
"margin": 4,
"color": "#000000",
"backgroundColor": "#FFFFFF",
"format": "png"
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]
| color |
| Нет |
| — |
| format | select | Нет | — |
Результат-изображение
{
"result": "/public/processing/randomid.jpg",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"width": 800,
"height": 600,
"format": "jpeg"
}
}