API & MCP

Everything a person can do on Battery Power Budget Planner, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Battery Power Budget Planner

List active and sleep currents with duty cycles to estimate average draw and battery runtime.

Inputs of Battery Power Budget Planner
FieldTypeDefaultDescription
loadstextarea"Controller,20,0.1,10\nSensor,5,0.01,5"Loads: name, active current (mA), sleep current (mA), duty (%). One load per row. Currents must be drawn from the battery itself.
capacitynumber2000Battery capacity (mAh)
usablePercentnumber80Usable capacity (%)

Example request

Intermittent sensor

curl -X POST https://ohmforgepowerbudget.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"loads":"Controller,20,0.1,10\nSensor,5,0.01,5","capacity":2000,"usablePercent":80}'

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": {
    "ohmforge-power-budget": { "type": "http", "url": "https://ohmforgepowerbudget.usefulweb.site/mcp" }
  }
}