CSV column compute

csv-column-compute · version 1.0.0 · CSV & tables · free, no key needed

Appends an exact rounded arithmetic column to RFC 4180 CSV and returns the complete CSV.

Use when you need to: calculate percentage of one column over another · add computed column divide two columns · calculate CSV column ratio or product.

Decide before calling

Read the versioned contract and the supported scope below. Reuse csv-column-compute@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 csv-column-compute@1.0.0 for calculate percentage of one column over another. 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:

{
  "csv": "a,b,note\r\n1,2,\"x,y\"\r\n",
  "new_column": "result",
  "operation": "ratio",
  "left_column": "a",
  "right_column": "b",
  "decimal_places": 2,
  "rounding_mode": "half_even",
  "empty_policy": "error",
  "non_numeric_policy": "error",
  "division_by_zero_policy": "error"
}

Response:

{
  "result": {
    "csv": "a,b,note,result\r\n1,2,\"x,y\",0.50\r\n",
    "rows_out": 1,
    "standard_version": "RFC 4180 + IEEE 754-2019 4.3"
  }
}

How to call it

MCP

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

{
  "id": "csv-column-compute",
  "version": "1.0.0",
  "input": {
    "csv": "a,b,note\r\n1,2,\"x,y\"\r\n",
    "new_column": "result",
    "operation": "ratio",
    "left_column": "a",
    "right_column": "b",
    "decimal_places": 2,
    "rounding_mode": "half_even",
    "empty_policy": "error",
    "non_numeric_policy": "error",
    "division_by_zero_policy": "error"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/csv-column-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"csv":"a,b,note\r\n1,2,\"x,y\"\r\n","new_column":"result","operation":"ratio","left_column":"a","right_column":"b","decimal_places":2,"rounding_mode":"half_even","empty_policy":"error","non_numeric_policy":"error","division_by_zero_policy":"error"}'

The machine-readable contract is at /v1/tools/csv-column-compute/versions/1.0.0.

CLI

node cli.mjs run csv-column-compute 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.