Math & Numbers
Решает давление, объем, температуру или моли по закону идеального газа (PV=nRT) или объединённому закону (P1V1/T1=P2V2/T2); также плотность и молярную массу.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/gas-law-calculator' \
-H 'Content-Type: application/json' \
-d '{"mode":"ideal","runits":"L·atm/mol·K","tempUnit":"kelvin","pressure":1,"volume":"","temperature":273.15,"moles":1,"p1":0,"v1":0,"t1":0,"p2":0,"v2":0,"t2":0,"molarMass":0,"mass":0,"decimalPlaces":4}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/gas-law-calculator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| mode | select | Нет | — |
| runits | select | Нет | Determines the pressure/volume units you must enter. Temperature is always converted to Kelvin internally. |
| tempUnit | select | Нет | — |
| pressure | number | Нет | Leave blank to solve for pressure in Ideal mode. |
| volume | number | Нет | Leave blank to solve for volume in Ideal mode. |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-gas-law-calculator": {
"name": "gas-law-calculator",
"description": "Решает давление, объем, температуру или моли по закону идеального газа (PV=nRT) или объединённому закону (P1V1/T1=P2V2/T2); также плотность и молярную массу.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=gas-law-calculator",
"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": "gas-law-calculator",
"arguments": {
"mode": "ideal",
"runits": "L·atm/mol·K",
"tempUnit": "kelvin",
"pressure": 1,
"volume": "",
"temperature": 273.15,
"moles": 1,
"p1": 0,
"v1": 0,
"t1": 0,
"p2": 0,
"v2": 0,
"t2": 0,
"molarMass": 0,
"mass": 0,
"decimalPlaces": 4
}
}
}| temperature | number | Нет | Leave blank to solve for temperature in Ideal mode. |
| moles | number | Нет | Leave blank to solve for moles in Ideal mode. |
| p1 | number | Нет | — |
| v1 | number | Нет | — |
| t1 | number | Нет | — |
| p2 | number | Нет | — |
| v2 | number | Нет | — |
| t2 | number | Нет | — |
| molarMass | number | Нет | — |
| mass | number | Нет | — |
| decimalPlaces | number | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Вопросы или проблемы? Свяжитесь с [email protected]