CSV rename columns

csv-rename-columns · version 1.0.0 · CSV & tables · free, no key needed

Rename CSV headers by an exact from/to mapping, preserving row cells and column order.

Use when you need to: csv rename columns · rename csv columns · rename csv headers.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "csv": "id,name,note\n1,Ada,\"hello, world\"\n",
  "mapping": [
    {
      "from": "name",
      "to": "full_name"
    },
    {
      "from": "id",
      "to": "user_id"
    }
  ]
}

Response:

{
  "result": {
    "csv": "user_id,full_name,note\n1,Ada,\"hello, world\"\n"
  }
}

How to call it

MCP

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

{
  "id": "csv-rename-columns",
  "version": "1.0.0",
  "input": {
    "csv": "id,name,note\n1,Ada,\"hello, world\"\n",
    "mapping": [
      {
        "from": "name",
        "to": "full_name"
      },
      {
        "from": "id",
        "to": "user_id"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/csv-rename-columns/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"csv":"id,name,note\n1,Ada,\"hello, world\"\n","mapping":[{"from":"name","to":"full_name"},{"from":"id","to":"user_id"}]}'

The machine-readable contract is at /v1/tools/csv-rename-columns/versions/1.0.0.

CLI

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

Get the client at /clients/cli/.