Math & Numbers
Пересчёт освещённости: lux (база СИ=lm/m²) ↔ kilolux (1=1000) ↔ footcandle (1=10,7639104) ↔ phot (1=10000) ↔ nox (1=0,001). Пересчёт через lux с выводом всех пяти эквивалентов. Эталон: полная луна ~0,25, офис 300–500, прямое солнце ~100000 lux.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/illuminance-converter' \
-H 'Content-Type: application/json' \
-d '{"inputUnit":"lux","value":500,"outputUnit":"footcandle","decimalPlaces":6}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/illuminance-converter| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| inputUnit | select | Нет | — |
| value | number | Да | Illuminance in the selected Input unit. Must be non-negative. |
| outputUnit | select | Нет | — |
| decimalPlaces | number | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-illuminance-converter": {
"name": "illuminance-converter",
"description": "Пересчёт освещённости: lux (база СИ=lm/m²) ↔ kilolux (1=1000) ↔ footcandle (1=10,7639104) ↔ phot (1=10000) ↔ nox (1=0,001). Пересчёт через lux с выводом всех пяти эквивалентов. Эталон: полная луна ~0,25, офис 300–500, прямое солнце ~100000 lux.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=illuminance-converter",
"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": "illuminance-converter",
"arguments": {
"inputUnit": "lux",
"value": 500,
"outputUnit": "footcandle",
"decimalPlaces": 6
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]