Array rational sum

array-rational-sum · version 1.0.0 · Numbers & math · free, no key needed

Sum an array of canonical rationals and return the reduced total.

Use when you need to: array rational sum · sum an array of rationals · add a list of fractions.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "values": [
    {
      "numerator": "1",
      "denominator": "2"
    },
    {
      "numerator": "1",
      "denominator": "3"
    },
    {
      "numerator": "1",
      "denominator": "6"
    }
  ]
}

Response:

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

How to call it

MCP

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

{
  "id": "array-rational-sum",
  "version": "1.0.0",
  "input": {
    "values": [
      {
        "numerator": "1",
        "denominator": "2"
      },
      {
        "numerator": "1",
        "denominator": "3"
      },
      {
        "numerator": "1",
        "denominator": "6"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/array-rational-sum/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"values":[{"numerator":"1","denominator":"2"},{"numerator":"1","denominator":"3"},{"numerator":"1","denominator":"6"}]}'

The machine-readable contract is at /v1/tools/array-rational-sum/versions/1.0.0.

CLI

node cli.mjs run array-rational-sum 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.