API & MCP

Everything a person can do on Repair or Replace, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Repair or Replace

Enter the age and expected lifespan of a broken item, the repair quote, the replacement price and running costs. The tool applies the common 50% rule of thumb and compares the cost per remaining year of repairing versus replacing, including the risk of another failure, and gives a reasoned verdict.

Inputs of Repair or Replace
FieldTypeDefaultDescription
itemNametext"Appliance"Item
currencytext"EUR"Currency. Shown in results only; no conversion is performed.
itemAgeYearsnumber6Age of the item
expectedLifespanYearsnumber10Typical lifespan. Typical total life of this kind of item; also used for the new one unless set below.
replacementPrice (required)number600Price of a new replacement
repairQuote (required)number200Repair quote
lifeAfterRepairYearsnumber3Expected extra life after repair
newItemLifespanYearsnumber—Lifespan of the new item (optional)
runningCostOldPerYearnumber0Running cost of the old item. Energy, water, consumables.
runningCostNewPerYearnumber0Running cost of the new item
failureProbabilityPercentnumber30Chance of another failure after repair. Your estimate for the extra life period; an assumption, not a statistic.
nextRepairCostnumber—Cost of that next repair (optional). Defaults to the current repair quote.
ruleThresholdPercentnumber50Rule-of-thumb threshold

Example request

Washing machine with a failed drum bearing

curl -X POST https://repairorreplace.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"itemName":"Washing machine","currency":"EUR","itemAgeYears":8,"expectedLifespanYears":11,"replacementPrice":550,"repairQuote":320,"lifeAfterRepairYears":3,"runningCostOldPerYear":75,"runningCostNewPerYear":55,"failureProbabilityPercent":35,"ruleThresholdPercent":50}'

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)

{
  "mcpServers": {
    "repair-or-replace": { "type": "http", "url": "https://repairorreplace.usefulweb.site/mcp" }
  }
}