Elysia Tools Docs
EN
Language
ZHESPTRUFRDEEN
Back to site
Browse tools

Data Processing

CSV Transformer

Transform and process CSV data with column operations, calculations, and data type conversions. Supports renaming columns, adding calculated columns, removing columns, converting data types, calculating values, and filtering rows. Operation examples: • Rename column: [{"type": "rename", "column": "old_name", "new_name": "new_name"}] • Add calculated column: [{"type": "add_column", "new_column": "total", "formula": "price * quantity"}] • Remove column: [{"type": "remove_column", "remove_column": "column_to_remove"}] • Convert data type: [{"type": "convert_type", "convert_column": "age", "target_type": "number"}] • Calculate values: [{"type": "calculate", "target_column": "total", "expression": "price * tax + shipping"}] • Filter rows: [{"type": "filter_values", "filter_column": "status", "operator": "equals", "value": "active"}]

file· File resultOpen tool

Quick start

Call this tool from your code in three languages.

cURL
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/csv-transformer' \
  -H 'Content-Type: application/json' \
  -d '{"filename":"csvFile.ext","contentType":"application/octet-stream","size":12345}'

# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
  --data-binary @/path/to/file.ext

# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/csv-transformer' \
  -F 'csvFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
  -F 'transformations=[{"type": "rename", "column": "姓名", "new_name": "学生姓名"}, {"type": "convert_type", "convert_column": "年龄", "target_type": "integer"}]' \
  -F 'outputFormat=csv' \
  -F 'includeHeader=true' \
  -F 'handleErrors=keep_original' \
  -F 'errorHandling=log'

© 2026 Elysia Tools. Developer documentation.

Back to siteBrowse tools

API reference

Send a POST request with your inputs as JSON. File parameters require a separate upload first.

Endpoint

HTTP
POST https://api.elysiatools.com/en/api/tools/csv-transformer

Parameters

NameTypeRequiredDescription
csvFilefileupload requiredYes—
transformationstextareaYes—
outputFormatselectNo—
includeHeadercheckboxNo—
handleErrorsselectNo—
errorHandlingselectNo—
File-type parameters must be uploaded first via POST /upload/csv-transformer, then the returned filePath is passed to the corresponding file field.

Response format

File result

JSON
{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}

MCP integration

Add this tool to your Model Context Protocol server so AI agents can list and call it.

Server configuration

Add this block to your MCP client configuration:

mcp.json
{
  "mcpServers": {
    "elysiatools-csv-transformer": {
      "name": "csv-transformer",
      "description": "Transform and process CSV data with column operations, calculations, and data type conversions. Supports renaming columns, adding calculated columns, removing columns, converting data types, calculating values, and filtering rows.\n\nOperation examples:\n• Rename column: [{\"type\": \"rename\", \"column\": \"old_name\", \"new_name\": \"new_name\"}]\n• Add calculated column: [{\"type\": \"add_column\", \"new_column\": \"total\", \"formula\": \"price * quantity\"}]\n• Remove column: [{\"type\": \"remove_column\", \"remove_column\": \"column_to_remove\"}]\n• Convert data type: [{\"type\": \"convert_type\", \"convert_column\": \"age\", \"target_type\": \"number\"}]\n• Calculate values: [{\"type\": \"calculate\", \"target_column\": \"total\", \"expression\": \"price * tax + shipping\"}]\n• Filter rows: [{\"type\": \"filter_values\", \"filter_column\": \"status\", \"operator\": \"equals\", \"value\": \"active\"}]",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=csv-transformer",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

List available tools

After connecting to the SSE endpoint, list the exposed tools:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Call this tool

Invoke the tool by its id, passing arguments built from its parameters:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "csv-transformer",
    "arguments": {
  "csvFile": "https://example.com/file.ext",
  "transformations": "[{\"type\": \"rename\", \"column\": \"姓名\", \"new_name\": \"学生姓名\"}, {\"type\": \"convert_type\", \"convert_column\": \"年龄\", \"target_type\": \"integer\"}]",
  "outputFormat": "csv",
  "includeHeader": true,
  "handleErrors": "keep_original",
  "errorHandling": "log"
}
  }
}
Chain multiple tools in one session with a comma-separated toolId list, e.g. /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp (max 20).
File parameters accept a public file URL only (https://…). Local paths, data: URIs, and Base64 strings are not supported.

Questions or issues? Contact [email protected]

Browse tools
Open tool