For agents and developers

BlueLux API & MCP

BlueLux provides public tools for pool chemistry, diagnostics, operating guidance, and Playbook search. BlueLux Operator is the professional platform we are building for pool operators, and the public calculation tools are grounded in the same deterministic chemistry work that supports our daily operation.

No authentication120 requests/minuteStructured JSONVersioned provenance

Connect your agent

Copy this sentence into an agent. The linked setup document explains BlueLux, MCP, REST, the available tools, safe use, and connection verification.

Fetch and follow the instructions to connect me to the BlueLux API and MCP from https://bluelux.com/agent-setup/prompt.md

Live request

Try a tool

Choose a tool, edit the raw JSON request, and inspect the complete production response. No key is required.

Loading schemaPOST /api/v2/tools/calculate_pool_dose

By using these tools, you agree to the Terms of Service.

Raw response

Run the example to see the complete JSON response.

REST API

REST is the simplest option for scripts, backends, workflows, and agents with an HTTP tool. Read the catalog, choose a tool, and send a JSON object to its endpoint.

The chlorine example omits product strength so the response discloses the current generic profile. You can instead send a named product_profile_id or explicit product_strength_percent and product_density_g_ml overrides where supported. Total alkalinity is required for a field-confident acid or soda-ash result.

Shell: dose request
curl https://bluelux.com/api/v2/tools/calculate_pool_dose \
  -H 'Content-Type: application/json' \
  --data '{
    "chemical": "liquid_chlorine",
    "volume_gallons": 10000,
    "current": 1,
    "target": 5
  }'
JavaScript example
JavaScript: LSI request
const response = await fetch(
  "https://bluelux.com/api/v2/tools/calculate_lsi",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      ph: 7.8,
      total_alkalinity_ppm: 100,
      calcium_hardness_ppm: 400,
      temperature_f: 80,
      tds_ppm: 3200,
      cyanuric_acid_ppm: 50,
      calculation_profile: "bluelux_equilibrium_v1"
    })
  }
);

const data = await response.json();

MCP

Connect a compatible MCP client to https://bluelux.com/mcp. The server is public and does not require caller authentication. The setup document above includes ready-to-use Codex, Claude Code, Cursor, and generic client configuration.

Direct MCP tools/list request
Shell: MCP tools/list
curl https://bluelux.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'MCP-Protocol-Version: 2026-07-28' \
  -H 'Mcp-Method: tools/list' \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {
      "_meta": {
        "io.modelcontextprotocol/protocolVersion": "2026-07-28",
        "io.modelcontextprotocol/clientInfo": {
          "name": "my-agent",
          "version": "1.0"
        },
        "io.modelcontextprotocol/clientCapabilities": {}
      }
    }
  }'

Tool reference

Open a tool to inspect its live JSON Schema, required fields, accepted values, units, omission behavior, and a request body you can copy.

Loading catalog
calculate_pool_doseCalculate exact and practical amounts for a specified chemical correction.
AttributeRequirementType or valuesDefinition
chemicalRequiredliquid_chlorine | muriatic_acid | sodium_bicarbonate | calcium_chloride | cyanuric_acid | pool_salt | soda_ashChemical or product family to calculate.
contextOptionalobjectDefault: nullOptional explicit facility context.If omitted: Facility assessment is not performed; no residential defaults are inserted.
context.use_typeOptionalresidential | commercialDefault: nullResidential or commercial use, only when known.If omitted: Unknown; residential use is never inferred.
context.water_body_typeOptionalpool | spa | wading_pool | spray_groundDefault: nullPool, spa, wading pool or spray ground, only when known.If omitted: Unknown.
context.facility_typeOptionalprivate_residential | hoa_apartment | hotel | gym_club | municipal | school | therapy | splash_pad | otherDefault: nullSpecific facility classification, such as private residential, HOA/apartment or hotel.If omitted: Unknown; use alone does not establish legal classification.
context.environmentOptionalindoor | outdoorDefault: nullIndoor or outdoor setting, only when known.If omitted: Unknown.
context.feed_methodOptionalmanual | automatic | mixedDefault: nullManual, automatic or mixed chemical addition.If omitted: Unknown; manual-addition requirements are not silently assumed absent.
context.sanitizer_systemOptionalliquid_chlorine | salt_generator | trichlor | dichlor | bromine | mixedDefault: nullActual sanitizer delivery system, including salt generation or stabilized chlorine products.If omitted: Unknown; stabilizer use is not inferred.
context.sanitizerOptionalchlorine | bromineDefault: nullChlorine or bromine sanitizer, only when known.If omitted: Unknown.
context.jurisdictionOptionalstringmin length 1, max length 120Default: nullApplicable jurisdiction supplied by the caller.If omitted: Unknown. No jurisdiction is inferred.
context.operating_profile_idOptionalstringmin length 1, max length 120Default: nullExplicit operating profile identifier.If omitted: No operating profile is inferred.
application_policy_idOptionalstringDefault: nullSelect bluelux_bounded_v1 explicitly to request its practical application quantities.If omitted: Only the exact correction is calculated; no practical recommendation or application projection is returned.
volume_gallonsUS gallonsRequiredintegermin 100, max 2000000Total water volume used to scale the calculation.
currentpH or ppmRequirednumbermin 0, max 100000Current measured value. For acid and soda ash this is pH; otherwise it is concentration.
targetpH or ppmRequirednumbermin 0, max 100000Desired value after the calculated correction.
product_profile_idOptionalstringmin length 1, max length 120Default: nullA named product profile from the published profile dataset.If omitted: The disclosed default profile for the selected chemical is used.
product_strength_percent%Optionalnumbergreater than 0, max 100Default: nullExplicit active strength or purity override.If omitted: The resolved product profile supplies strength.
product_concentration_basisOptionalavailable_chlorine_trade_percent | available_chlorine_weight_percent | sodium_hypochlorite_weight_percentDefault: nullLiquid chlorine only. Without property overrides, use the selected profile's basis and density. A strength-only override means trade percent; explicit weight bases require strength and density.
product_density_g_mlg/mLOptionalMuriatic acid only.numbergreater than 0, max 3Default: nullExplicit acid product density override when the label or SDS supports it.
total_alkalinity_ppmppmOptionalNeeded for field-confident muriatic acid and soda ash guidance.numbermin 0, max 1000Default: nullMeasured total alkalinity as calcium carbonate.
cyanuric_acid_ppmppmOptionalnumbermin 0, max 1000Default: nullMeasured cyanuric acid used for chlorine context and carbonate alkalinity correction.If omitted: The response discloses the contract default or provisional calculation path.
borates_ppm_as_boronppm as boronOptionalMuriatic acid and soda ash only.numbermin 0, max 1000Default: nullBorate reading used by the pH adjustment model.
free_chlorine_ppmppmOptionalMuriatic acid and soda ash only.numbermin 0, max 100Default: nullFree chlorine reading used by the pH adjustment model.
temperature_f°FOptionalnumbermin 32, max 140Default: nullWater temperature.If omitted: The response discloses any default used.
tds_ppmppmOptionalnumbergreater than 0, max 20000Default: nullTotal dissolved solids.If omitted: The response discloses any default used.
POST /api/v2/tools/calculate_pool_dose
{
  "chemical": "liquid_chlorine",
  "volume_gallons": 10000,
  "current": 1,
  "target": 5,
  "application_policy_id": null,
  "context": {
    "use_type": null,
    "water_body_type": null,
    "sanitizer": null
  }
}
calculate_lsiCalculate LSI using the versioned BlueLux chemistry contract.
AttributeRequirementType or valuesDefinition
phpHRequirednumbermin 0, max 14Measured water pH.
total_alkalinity_ppmppmRequiredNeeded for field-confident muriatic acid and soda ash guidance.numbergreater than 0, max 1000Measured total alkalinity as calcium carbonate.
calcium_hardness_ppmppmRequirednumbergreater than 0, max 10000Measured calcium hardness as calcium carbonate.
temperature_f°FOptionalnumbermin 32, max 140Default: nullWater temperature.If omitted: The response discloses any default used.
tds_ppmppmOptionalnumbergreater than 0, max 100000Default: nullTotal dissolved solids.If omitted: The response discloses any default used.
cyanuric_acid_ppmppmOptionalnumbermin 0, max 1000Default: nullMeasured cyanuric acid used for chlorine context and carbonate alkalinity correction.If omitted: The response discloses the contract default or provisional calculation path.
calculation_profileOptionalbluelux_equilibrium_v1 | phta_2024_table_v1Default: bluelux_equilibrium_v1Versioned LSI calculation profile.If omitted: The revised BlueLux equilibrium profile is selected.
POST /api/v2/tools/calculate_lsi
{
  "ph": 7.8,
  "total_alkalinity_ppm": 100,
  "calcium_hardness_ppm": 400,
  "temperature_f": 80,
  "tds_ppm": 3200,
  "cyanuric_acid_ppm": 50
}
list_product_profilesList the versioned product profiles used by deterministic calculations.

This tool accepts an empty JSON object; it has no input attributes.

POST /api/v2/tools/list_product_profiles
{}
get_product_profileGet the properties and version of one calculation product profile.
AttributeRequirementType or valuesDefinition
profile_idRequiredstringIdentifier of a published versioned product profile.
POST /api/v2/tools/get_product_profile
{
  "profile_id": "bluelux-liquid-chlorine-12_5"
}
get_metals_protocolReturn the diagnostic sequence for suspected metal staining or colored water.
AttributeRequirementType or valuesDefinition
symptomOptionalstringmax length 500Plain-language observation used to focus the diagnostic protocol.If omitted: The response returns the general protocol.
confirmed_metalOptionaliron | copper | manganese | unknownMetal identified by a reliable test, or unknown.If omitted: The metal is treated as unknown.
POST /api/v2/tools/get_metals_protocol
{
  "symptom": "rust-colored stains after chlorine was added",
  "confirmed_metal": "iron"
}
get_nutrient_thresholdsInterpret phosphate and nitrate readings as operating context rather than universal health limits.
AttributeRequirementType or valuesDefinition
phosphate_ppbppbOptionalnumberMeasured orthophosphate result.If omitted: Phosphate-specific interpretation is omitted.
nitrate_ppmppmOptionalnumberMeasured nitrate result.If omitted: Nitrate-specific interpretation is omitted.
POST /api/v2/tools/get_nutrient_thresholds
{
  "phosphate_ppb": 500,
  "nitrate_ppm": 12
}
diagnose_filter_circulationReturn deterministic checks from pressure, flow, and pump-prime observations.
AttributeRequirementType or valuesDefinition
filter_pressure_psipsiOptionalnumberCurrent operating filter pressure.If omitted: No numeric pressure comparison is produced.
baseline_pressure_psipsiOptionalnumberClean-filter pressure for this equipment under comparable conditions.If omitted: No percentage change from baseline is produced.
visible_flowOptionalnormal | low | none | surgingObserved return-flow condition.
pump_primedOptionalbooleanWhether the pump has a stable water-filled prime.
POST /api/v2/tools/diagnose_filter_circulation
{
  "filter_pressure_psi": 22,
  "baseline_pressure_psi": 14,
  "visible_flow": "low",
  "pump_primed": true
}
get_seasonal_checklistReturn an ordered residential or public-facility checklist.
AttributeRequirementType or valuesDefinition
actionRequiredstartup | shutdownChecklist direction.
facility_typeOptionalresidential | publicResidential or public-facility context.If omitted: Residential is used by the current tool.
POST /api/v2/tools/get_seasonal_checklist
{
  "action": "startup",
  "facility_type": "residential"
}
search_playbookReturn ranked Playbook passages with versions, sources, and canonical URLs.
AttributeRequirementType or valuesDefinition
queryRequiredstringmin length 2, max length 500Natural-language Playbook search query.
limitOptionalintegermin 1, max 8Maximum number of ranked passages to return.If omitted: The service applies its default result count.
POST /api/v2/tools/search_playbook
{
  "query": "free chlorine is low and pH is high",
  "limit": 3
}
plan_pool_treatmentStateless maintenance guidance from supplied readings and the selected versioned policy. Preserve notice, holds, units and warnings.
AttributeRequirementType or valuesDefinition
policy_profileOptionalobjectExact treatment policy profile_id and version. Explicit null is invalid.If omitted: Supported residential chlorine pools use bluelux-residential-maintenance@1.0.0. Other contexts use bluelux-context-review@1.0.0 with treatment holds. The response reports defaulted status.
policy_profile.profile_idRequiredstringmin length 1, max length 120See the live OpenAPI contract for this field.
policy_profile.versionRequiredstringmin length 1, max length 40See the live OpenAPI contract for this field.
custom_productsOptionalobjectExplicit strength, concentration basis and applicable density by chemical. Mutually exclusive with a named profile for that chemical; see the integration guide.
volume_gallonsUS gallonsOptionalintegermin 100, max 2000000Default: nullTotal water volume used to scale the calculation.
phpHOptionalnumbermin 0, max 14Default: nullMeasured water pH.
free_chlorineOptionalnumbermin 0, max 100Default: nullSee the live OpenAPI contract for this field.
total_chlorineOptionalnumbermin 0, max 100Default: nullSee the live OpenAPI contract for this field.
total_alkalinityOptionalnumbermin 0, max 1000Default: nullSee the live OpenAPI contract for this field.
cyanuric_acidOptionalnumbermin 0, max 1000Default: nullSee the live OpenAPI contract for this field.
calcium_hardnessOptionalnumbermin 0, max 10000Default: nullSee the live OpenAPI contract for this field.
saltOptionalnumbermin 0, max 10000Default: nullSee the live OpenAPI contract for this field.
tdsOptionalnumbermin 0, max 20000Default: nullSee the live OpenAPI contract for this field.
temperatureOptionalnumbermin 32, max 140Default: nullSee the live OpenAPI contract for this field.
algaeOptionalnone | some | heavyDefault: nullSee the live OpenAPI contract for this field.
scaleOptionalnone | some | heavyDefault: nullSee the live OpenAPI contract for this field.
water_clarityOptionalclear | cloudy | greenDefault: nullSee the live OpenAPI contract for this field.
organic_loadOptionallow | medium | highDefault: nullSee the live OpenAPI contract for this field.
leaf_loadOptionalunknown | low | medium | highDefault: nullSee the live OpenAPI contract for this field.
algae_historyOptionalnone | recent | recurringDefault: nullSee the live OpenAPI contract for this field.
algae_proneOptionalunknown | none | recent | recurringDefault: nullSee the live OpenAPI contract for this field.
sun_exposureOptionalunknown | full_sun | mixed | heavy_shadeDefault: nullSee the live OpenAPI contract for this field.
circulationOptionalunknown | good | poorDefault: nullSee the live OpenAPI contract for this field.
circulation_riskOptionalunknown | good | watch | poorDefault: nullSee the live OpenAPI contract for this field.
salt_cell_statusOptionalunknown | ok | needs_maintenance | offlineDefault: nullSee the live OpenAPI contract for this field.
tablet_statusOptionalunknown | empty | low | adequateDefault: nullSee the live OpenAPI contract for this field.
contextOptionalobjectDefault: nullOptional explicit facility context.If omitted: Facility assessment is not performed; no residential defaults are inserted.
context.use_typeOptionalresidential | commercialDefault: nullResidential or commercial use, only when known.If omitted: Unknown; residential use is never inferred.
context.water_body_typeOptionalpool | spa | wading_pool | spray_groundDefault: nullPool, spa, wading pool or spray ground, only when known.If omitted: Unknown.
context.facility_typeOptionalprivate_residential | hoa_apartment | hotel | gym_club | municipal | school | therapy | splash_pad | otherDefault: nullSpecific facility classification, such as private residential, HOA/apartment or hotel.If omitted: Unknown; use alone does not establish legal classification.
context.environmentOptionalindoor | outdoorDefault: nullIndoor or outdoor setting, only when known.If omitted: Unknown.
context.feed_methodOptionalmanual | automatic | mixedDefault: nullManual, automatic or mixed chemical addition.If omitted: Unknown; manual-addition requirements are not silently assumed absent.
context.sanitizer_systemOptionalliquid_chlorine | salt_generator | trichlor | dichlor | bromine | mixedDefault: nullActual sanitizer delivery system, including salt generation or stabilized chlorine products.If omitted: Unknown; stabilizer use is not inferred.
context.sanitizerOptionalchlorine | bromineDefault: nullChlorine or bromine sanitizer, only when known.If omitted: Unknown.
context.jurisdictionOptionalstringmin length 1, max length 120Default: nullApplicable jurisdiction supplied by the caller.If omitted: Unknown. No jurisdiction is inferred.
context.operating_profile_idOptionalstringmin length 1, max length 120Default: nullExplicit operating profile identifier.If omitted: No operating profile is inferred.
reading_sourceOptionaldigital | taylor_kit | strip | unknownDefault: nullSee the live OpenAPI contract for this field.
confirmed_readingsOptionalarrayDefault: nullSee the live OpenAPI contract for this field.
product_profile_idsOptionalobjectDefault: nullNamed products from the existing public catalog, keyed by chemical.
reading_timesOptionalobjectMeasurement ISO date/time per field; explicit null means date unknown. Chat stamps newly submitted readings as just taken unless the technician supplies another date. Preserve stored dates on reuse.If omitted: Newly supplied readings are treated as just taken.
reading_originsOptionalobjectSource of each supplied reading: provided, image, history or unknown.If omitted: Provided is reported for newly submitted readings.
POST /api/v2/tools/plan_pool_treatment
{
  "volume_gallons": 20000,
  "ph": 7.8,
  "free_chlorine": 1,
  "total_alkalinity": 80,
  "cyanuric_acid": 40,
  "calcium_hardness": 350,
  "temperature": 80,
  "tds": 1500,
  "context": {
    "use_type": "residential",
    "water_body_type": "pool",
    "sanitizer": "chlorine"
  }
}
list_policy_profilesDiscover supported scope, versions and documented defaults.

This tool accepts an empty JSON object; it has no input attributes.

POST /api/v2/tools/list_policy_profiles
{}
get_policy_profileResolve an exact policy ID and version without fallback.
AttributeRequirementType or valuesDefinition
profile_idRequiredstringIdentifier of a published versioned product profile.
versionRequiredstringExact available policy version from discovery; never silently falls back.
POST /api/v2/tools/get_policy_profile
{
  "profile_id": "bluelux-residential-maintenance",
  "version": "1.0.0"
}

Results and errors

Successful resultsChemistry tools return versioned facts: supplied inputs, calculation status, facility assessment, quantities, constraints, reason codes and provenance. The website explains those facts locally; integrations should use the structured fields rather than display wording. Dose results separate exact_amount from recommended_amount and disclose rounding, caps, remaining modeled correction, and the selected product profile.
ErrorsInvalid inputs return structured 4xx errors. If the calculation service is unavailable, the API returns an error instead of inventing a result.

The engine behind the API

Informed by BlueLux Operator

BlueLux Operator is the agent-first operating platform we are building for professional pool operators. The public API is a narrow, documented calculation surface and does not provide access to private customer data or operating workflows.

Learn about BlueLux Operator and register interest

Safety and operating scope

These tools provide calculations and operating guidance from the inputs supplied. Confirm pool volume, measurements, units, product concentration, and facility type. Follow the returned scope and sources. Product labels, Safety Data Sheets, manufacturer instructions, emergency directions, and controlling codes take precedence. Public aquatic facilities require facility-plan and jurisdiction review.