Math & Numbers
Convert between pH, [H+], pOH and [OH-], or compute pH from a strong acid/base concentration, including dilution.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/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}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/ph-calculator| Name | Type | Required | Description |
|---|---|---|---|
| mode | select | No | — |
| inputQuantity | select | No | Which of the four quantities you are entering. |
| inputValue | number | No | Numeric value of the selected input quantity. |
| acidBase | select | No | — |
| protonCount | number | No | Number of H+ per acid molecule (HCl=1, H2SO4=2) or OH- per base unit (NaOH=1, Ba(OH)2=2). |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-ph-calculator": {
"name": "ph-calculator",
"description": "Convert between pH, [H+], pOH and [OH-], or compute pH from a strong acid/base concentration, including dilution.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=ph-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"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
}
}
}Questions or issues? Contact [email protected]
| concentration | number | No | Molar concentration of the acid or base (mol/L). |
| v1 | number | No | Initial volume of the acid/base solution before dilution. |
| v2 | number | No | Volume of pure water added to dilute the solution. |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}