API & MCP
Everything a person can do on Aquarium Water Change and Dosing, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://hearthwaterchange.usefulweb.site/api/v1/calculate– run Aquarium Water Change and DosingGET https://hearthwaterchange.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Aquarium Water Change and Dosing
Shows how the nitrate level falls with repeated partial water changes — including the nitrate in your tap water and how much builds up between changes — how many changes reach your target, and how much water conditioner, fertiliser or medication to add for the tank or the new water, from the label values you type.
| Field | Type | Default | Description |
|---|---|---|---|
tankLitres | number | 96 | Water in the tank (litres). The real water volume — the Aquarium Volume and Weight tool works it out. |
changePercent | number | 25 | Water changed each time (%) |
changes | integer | 4 | Number of changes to plan |
currentNitrate | number | 40 | Nitrate now (mg/L NO₃) |
tapNitrate | number | 10 | Nitrate in the new water (mg/L NO₃). Your water supplier publishes it; test kits show it too. |
targetNitrate | number | 20 | Target nitrate (mg/L NO₃) |
buildUp | number | 5 | Nitrate that builds up between two changes (mg/L). Measure before and after a week; 0 ignores it. |
products | table | [{"name":"Water conditioner","amount":5,"unit":"ml","perLitres":100,"basis":"new | Products to dose (from the label) |
Example request
96 L tank, 40 → 20 mg/L with 25 % changes
curl -X POST https://hearthwaterchange.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"tankLitres":96,"changePercent":25,"changes":4,"currentNitrate":40,"tapNitrate":10,"targetNitrate":20,"buildUp":5,"products":[{"name":"Water conditioner","amount":5,"unit":"ml","perLitres":100,"basis":"new"}]}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://hearthwaterchange.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
hearth_water_change - Local stdio connector:
node src/mcp-stdio.ts --tool=hearth-water-change
{
"mcpServers": {
"hearth-water-change": { "type": "http", "url": "https://hearthwaterchange.usefulweb.site/mcp" }
}
}