CSV filter compare
csv-filter-compare · version 1.0.0 · CSV & tables · free, no key needed
Filter ASCII CSV rows by string/decimal comparison; requires CRLF records, rejects LF-only and non-ASCII input.
Use when you need to: filter CSV rows by column value · keep CSV records greater than a number · select rows with an exact field value.
Decide before calling
Read the versioned contract and the supported scope below. Reuse csv-filter-compare@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-filter-compare@1.0.0 for filter CSV rows by column value. 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
- filter CSV rows by column value
- keep CSV records greater than a number
- select rows with an exact field value
- compare a CSV column as exact decimals
- remove rows equal to a literal
- filter comma separated data by threshold
Not supported
- regular expression matching
- locale-aware collation
- floating-point or exponent notation
Behavior
- The first RFC 4180 record is a unique, non-empty header and is always retained.
- Decimal comparison uses sign and digit strings exactly; it never converts to binary floating point.
- String ordering compares UTF-16 code units with JavaScript relational operators; no locale or normalization is applied.
Input
csv(string, required): min length 1; max length 16384column(string, required): min length 1; max length 256operator(one of "=", "!=", "<", "<=", ">", ">=", required)literal(string, required): max length 16384comparison(one of "decimal", "string", required)
Output
csv(string, required): max length 32768rows_in(integer, required): min 0; max 255rows_out(integer, required): min 0; max 255standard_version(constant "RFC 4180 (October 2005)", required)
Limits
- max input bytes: 16384
- max rows: 256
- max columns: 32
- max iterations: 16384
- max output bytes: 32768
Example
Request input:
{
"csv": "name,score\r\nAda,10\r\nBob,2",
"column": "score",
"operator": ">=",
"literal": "10",
"comparison": "decimal"
}
Response:
{
"result": {
"csv": "name,score\r\nAda,10",
"rows_in": 2,
"rows_out": 1,
"standard_version": "RFC 4180 (October 2005)"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-filter-compare",
"version": "1.0.0",
"input": {
"csv": "name,score\r\nAda,10\r\nBob,2",
"column": "score",
"operator": ">=",
"literal": "10",
"comparison": "decimal"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-filter-compare/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"name,score\r\nAda,10\r\nBob,2","column":"score","operator":">=","literal":"10","comparison":"decimal"}'
The machine-readable contract is at /v1/tools/csv-filter-compare/versions/1.0.0.
CLI
node cli.mjs run csv-filter-compare 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV filter pattern literal: Filter ASCII CSV with literal contains/starts-with; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV dialect format: Format string rows as CSV for an explicit dialect, quoting a one-field empty record when it can.
- CSV to markdown table: Render ASCII CSV with CRLF records as Markdown; rejects LF-only records and non-ASCII text.
- Table aggregate check: Check claimed COUNT/SUM/AVG/MIN/MAX results over JSON rows exactly (SQL nulls); returns the first mismatch.
- CSV dialect parse: Parse CSV with an explicit dialect into string rows, keeping leading zeros and embedded breaks.
- CSV filter equals: Keep CSV data rows whose named column equals an exact string.