Array integer cumulative sum

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

Replace an array of canonical integer strings with equal-length prefix sums.

Use when you need to: array integer cumulative sum · prefix sums of integer array · running total of integer strings.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "values": [
    "4",
    "-1",
    "7",
    "0"
  ]
}

Response:

{
  "result": {
    "values": [
      "4",
      "3",
      "10",
      "10"
    ]
  }
}

How to call it

MCP

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

{
  "id": "array-integer-cumulative-sum",
  "version": "1.0.0",
  "input": {
    "values": [
      "4",
      "-1",
      "7",
      "0"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/array-integer-cumulative-sum/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"values":["4","-1","7","0"]}'

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

CLI

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

Get the client at /clients/cli/.