Math & Numbers
Перевод между pH, [H+], pOH и [OH-], расчет pH по концентрации сильной кислоты или основания, а также pH после разбавления. Основано на Kw = 1×10⁻¹⁴ (25 °C).
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/ph-calculator' \
-H 'Content-Type: application/json' \
-d '{"mode":"convert","inputQuantity":"ph","inputValue":3,"acidBase":"acid","protonCount":1,"concentration":0,"v1":0,"v2":0,"decimalPlaces":4}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/ph-calculator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| mode | select | Нет | — |
| inputQuantity | select | Нет | Which of the four quantities you are entering. |
| inputValue | number | Нет | Numeric value of the selected input quantity. |
| acidBase | select | Нет | — |
| protonCount | number | Нет | Number of H+ per acid molecule (HCl=1, H2SO4=2) or OH- per base unit (NaOH=1, Ba(OH)2=2). |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-ph-calculator": {
"name": "ph-calculator",
"description": "Перевод между pH, [H+], pOH и [OH-], расчет pH по концентрации сильной кислоты или основания, а также pH после разбавления. Основано на Kw = 1×10⁻¹⁴ (25 °C).",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=ph-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": "ph-calculator",
"arguments": {
"mode": "convert",
"inputQuantity": "ph",
"inputValue": 3,
"acidBase": "acid",
"protonCount": 1,
"concentration": 0,
"v1": 0,
"v2": 0,
"decimalPlaces": 4
}
}
}Вопросы или проблемы? Свяжитесь с [email protected]
| concentration | number | Нет | Molar concentration of the acid or base (mol/L). |
| v1 | number | Нет | Initial volume of the acid/base solution before dilution. |
| v2 | number | Нет | Volume of pure water added to dilute the solution. |
| decimalPlaces | number | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}