CSV replace exact
csv-replace-exact · version 1.0.0 · CSV & tables · free, no key needed
Replace CSV data cells whose entire value equals an exact find string.
Use when you need to: csv replace exact · replace exact csv cells · csv cell exact substitution.
Decide before calling
Read the versioned contract and the supported scope below. Reuse csv-replace-exact@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-replace-exact@1.0.0 for csv replace exact. 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
- csv replace exact
- replace exact csv cells
- csv cell exact substitution
Not supported
- substring replacement
- regex replacement
- case-insensitive replace
- header replacement
- text-replace-exact on the raw csv document
- trim cells
- read files
- fetch urls
Behavior
- The first CSV record is the header row and is never rewritten. An empty document is rejected; a header-only document is identity CSV with replacements 0.
- A data cell is replaced only when the entire cell string equals find. Substring, regex, and case-folded matches are not applied.
- If columns is omitted, every data column is eligible. If present, columns names unique existing headers exactly and only those columns are scanned.
- find and replace may be empty. No trimming, type coercion, or locale compare is performed. replacements counts matching data cells, including identity replacements where find equals replace.
- The first output header name may not begin with U+FEFF because it is ambiguous with a CSV byte-order mark.
Input
csv(string, required): max length 256000find(string, required): max length 262144replace(string, required): max length 262144columns(array of string, optional): min items 1; max items 256; each min length 1; each max length 256
Output
csv(string, required)replacements(integer, required): min 0
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- max find bytes: 262144
- max replace bytes: 262144
- max output bytes: 256000
Example
Request input:
{
"csv": "status,note\nok,ok\npending,ok\n",
"find": "ok",
"replace": "done"
}
Response:
{
"result": {
"csv": "status,note\ndone,done\npending,done\n",
"replacements": 3
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-replace-exact",
"version": "1.0.0",
"input": {
"csv": "status,note\nok,ok\npending,ok\n",
"find": "ok",
"replace": "done"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-replace-exact/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"status,note\nok,ok\npending,ok\n","find":"ok","replace":"done"}'
The machine-readable contract is at /v1/tools/csv-replace-exact/versions/1.0.0.
CLI
node cli.mjs run csv-replace-exact 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV fill defaults: Replace empty cells in named CSV columns with exact default strings.
- CSV dialect format: Format string rows as CSV for an explicit dialect, quoting a one-field empty record when it can.
- CSV dialect parse: Parse CSV with an explicit dialect into string rows, keeping leading zeros and embedded breaks.
- CSV filter compare: Filter ASCII CSV rows by string/decimal comparison; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV filter empty: Keep or drop CSV rows whose named column is the empty string.
- CSV split column: Split one CSV column on an exact separator into uniquely named columns.