{"id":"csv-column-compute","version":"1.0.0","description":"Appends an exact rounded arithmetic column to RFC 4180 CSV and returns the complete CSV.","supported_operations":["calculate percentage of one column over another","add computed column divide two columns","calculate CSV column ratio or product","table computed expression columns","append exact decimal column to csv","multiply two named CSV columns"],"unsupported_operations":["does not evaluate arbitrary formulas","does not infer CSV dialects"],"semantics":["Parse and serialize RFC 4180 records with CRLF output and a required unique header.","Exactly one of right_column and constant is required; ratio and percentage apply left/right, percentage multiplies by 100 before rounding.","Decimal strings are evaluated with integer arithmetic and rounded once to decimal_places using rounding_mode.","Original fields and row order are preserved; new_column is appended.","Strip one leading UTF-8 BOM before parsing the header.","division_by_zero_policy zero returns zero formatted to decimal_places for ratio and percentage."],"limits":{"max_input_bytes":16384,"max_rows":500,"max_columns":40,"max_cell_bytes":256,"max_output_bytes":32768,"max_decimal_digits":100,"max_decimal_places":12},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"properties":{"csv":{"type":"string","minLength":1,"maxLength":16384},"new_column":{"type":"string","minLength":1,"maxLength":64},"operation":{"type":"string","enum":["ratio","percentage","difference","sum","product"]},"left_column":{"type":"string","minLength":1,"maxLength":64},"right_column":{"type":"string","minLength":1,"maxLength":64},"constant":{"type":"string","minLength":1,"maxLength":64},"decimal_places":{"type":"integer","minimum":0,"maximum":12},"rounding_mode":{"type":"string","enum":["half_even","half_up","toward_zero","toward_positive","toward_negative"]},"empty_policy":{"type":"string","enum":["error","empty","zero"]},"non_numeric_policy":{"type":"string","enum":["error","empty","zero"]},"division_by_zero_policy":{"type":"string","enum":["error","empty","zero"]}},"required":["csv","new_column","operation","left_column","decimal_places","rounding_mode","empty_policy","non_numeric_policy","division_by_zero_policy"]},"output_schema":{"type":"object","additionalProperties":false,"properties":{"csv":{"type":"string","maxLength":32768},"rows_out":{"type":"integer","minimum":0,"maximum":500},"standard_version":{"type":"string","const":"RFC 4180 + IEEE 754-2019 4.3"}},"required":["csv","rows_out","standard_version"]},"examples":[{"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"},"output":{"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"}},{"input":{"csv":"a,b\r\n5,2\r\n","new_column":"result","operation":"difference","left_column":"a","right_column":"b","decimal_places":0,"rounding_mode":"half_even","empty_policy":"error","non_numeric_policy":"error","division_by_zero_policy":"error"},"output":{"csv":"a,b,result\r\n5,2,3\r\n","rows_out":1,"standard_version":"RFC 4180 + IEEE 754-2019 4.3"}}],"execute_url":"/v1/tools/csv-column-compute/versions/1.0.0/execute"}