Table decimal group rollup

table-decimal-group-rollup · version 1.0.0 · CSV & tables · free, no key needed

Sum exact decimal strings over deterministic SQL ROLLUP grouping sets with explicit subtotal markers.

Use when you need to: rollup decimal table by dimensions · grouped rollup for json rows · exact decimal rollup table.

Decide before calling

Read the versioned contract and the supported scope below. Reuse table-decimal-group-rollup@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use table-decimal-group-rollup@1.0.0 for rollup decimal table by dimensions. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "rows": [
    {
      "region": "east",
      "amount": "1.1"
    },
    {
      "region": "east",
      "amount": "2.2"
    }
  ],
  "dimensions": [
    "region"
  ],
  "measure": "amount"
}

Response:

{
  "result": {
    "standard_version": "ISO/IEC 9075-2:2016",
    "groups": [
      {
        "dimensions": [
          {
            "value": "east",
            "subtotal": false
          }
        ],
        "count": 2,
        "sum": "3.3"
      },
      {
        "dimensions": [
          {
            "value": null,
            "subtotal": true
          }
        ],
        "count": 2,
        "sum": "3.3"
      }
    ]
  }
}

How to call it

MCP

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

{
  "id": "table-decimal-group-rollup",
  "version": "1.0.0",
  "input": {
    "rows": [
      {
        "region": "east",
        "amount": "1.1"
      },
      {
        "region": "east",
        "amount": "2.2"
      }
    ],
    "dimensions": [
      "region"
    ],
    "measure": "amount"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/table-decimal-group-rollup/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"rows":[{"region":"east","amount":"1.1"},{"region":"east","amount":"2.2"}],"dimensions":["region"],"measure":"amount"}'

The machine-readable contract is at /v1/tools/table-decimal-group-rollup/versions/1.0.0.

CLI

node cli.mjs run table-decimal-group-rollup 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.