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 Dosing
  • GET https://hearthwaterchange.usefulweb.site/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

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.

Inputs of Aquarium Water Change and Dosing
FieldTypeDefaultDescription
tankLitresnumber96Water in the tank (litres). The real water volume — the Aquarium Volume and Weight tool works it out.
changePercentnumber25Water changed each time (%)
changesinteger4Number of changes to plan
currentNitratenumber40Nitrate now (mg/L NO₃)
tapNitratenumber10Nitrate in the new water (mg/L NO₃). Your water supplier publishes it; test kits show it too.
targetNitratenumber20Target nitrate (mg/L NO₃)
buildUpnumber5Nitrate that builds up between two changes (mg/L). Measure before and after a week; 0 ignores it.
productstable[{"name":"Water conditioner","amount":5,"unit":"ml","perLitres":100,"basis":"newProducts 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" }
  }
}