# CSV filter equals

`csv-filter-equals` · version 1.0.0 · CSV & tables · free, no key needed

Keep CSV data rows whose named column equals an exact string.

**Use when you need to: csv filter equals · filter csv by column value · csv where column equals.**

## Supported

- csv filter equals
- filter csv by column value
- csv where column equals

## Not supported

- trim
- case fold
- regex
- numeric compare
- read files

## Behavior

- Reuse baseline parseCsvDocument / stringifyCsv and CSV limits.
- The first record is the header. Duplicate/empty headers and ragged rows are rejected by the shared parser.
- column must be an exact header name. Unknown column is invalid_input.
- Keep rows where the cell equals value with exact string equality. No trim or coercion.
- Row order is stable. Empty document returns empty csv with zeros. Header-only returns header-only csv.

## Input

- `csv` (string, required): max length 256000
- `column` (string, required): min length 1; max length 256
- `value` (string, required): max length 256000

## Output

- `csv` (string, required)
- `rows_in` (integer, required)
- `rows_out` (integer, required)

## Limits

- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256

## Example

Request input:

```json
{
  "csv": "k,v\na,1\nb,2\na,3\n",
  "column": "k",
  "value": "a"
}
```

Response:

```json
{
  "result": {
    "csv": "k,v\na,1\na,3\n",
    "rows_in": 3,
    "rows_out": 2
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "csv-filter-equals",
  "version": "1.0.0",
  "input": {
    "csv": "k,v\na,1\nb,2\na,3\n",
    "column": "k",
    "value": "a"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/csv-filter-equals/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"csv":"k,v\na,1\nb,2\na,3\n","column":"k","value":"a"}'
```

The machine-readable contract is at [/v1/tools/csv-filter-equals/versions/1.0.0](/v1/tools/csv-filter-equals/versions/1.0.0).

### CLI

```sh
node cli.mjs run csv-filter-equals 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [CSV abs integer column](/tools/csv-abs-integer-column): Replace every data cell in a named CSV column with the absolute value of a canonical integer.
- [CSV scale integer column](/tools/csv-scale-integer-column): Multiply every data cell in a named CSV column by a canonical integer factor.
- [CSV split column](/tools/csv-split-column): Split one CSV column on an exact separator into uniquely named columns.
- [CSV clamp integer column](/tools/csv-clamp-integer-column): Clamp every data cell in a named CSV column to optional canonical integer min and max bounds.
- [CSV dedupe](/tools/csv-dedupe): Remove duplicate CSV data rows while preserving the first occurrence.
- [CSV distinct values](/tools/csv-distinct-values): List distinct exact values of one CSV column in first-seen order.
