Mass add

mass-add · version 1.0.0 · Units & sizes · free, no key needed

Add mixed-unit canonical integer mass amounts and express the sum in a target unit as a reduced rational.

Use when you need to: mass add · add mass quantities · sum masses in mixed units.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "terms": [
    {
      "value": "1",
      "unit": "kg"
    },
    {
      "value": "500",
      "unit": "g"
    }
  ],
  "to": "g"
}

Response:

{
  "result": {
    "numerator": "1500",
    "denominator": "1"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "mass-add",
  "version": "1.0.0",
  "input": {
    "terms": [
      {
        "value": "1",
        "unit": "kg"
      },
      {
        "value": "500",
        "unit": "g"
      }
    ],
    "to": "g"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/mass-add/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"terms":[{"value":"1","unit":"kg"},{"value":"500","unit":"g"}],"to":"g"}'

The machine-readable contract is at /v1/tools/mass-add/versions/1.0.0.

CLI

node cli.mjs run mass-add 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.