# CSV min max integers

`csv-min-max-integers` · version 1.0.0 · CSV & tables · free, no key needed

Minimum and maximum of a CSV column of strict signed base-10 integer strings.

**Use when you need to: csv min max integers · csv integer range · min max csv integers.**

## Supported

- csv min max integers
- csv integer range
- min max csv integers

## Not supported

- floats
- ignore empty
- median
- locale

## Behavior

- Reuse baseline CSV parser and limits.
- Canonical signed base-10 integer strings: /^-?(0|[1-9][0-9]*)$/.
- Reject leading zeros, plus signs, spaces, decimals, exponents, hex, empty, and -0.
- At most 256 digits excluding the sign. Compute with BigInt. Never return JSON BigInt.
- Canonical output is the same form; 0 is "0".
- Every data cell in column must be a canonical integer string. Empty cells are invalid.
- No rows -> invalid_input.
- min and max are canonical integer strings. Comparison uses BigInt, not Number.

## Input

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

## Output

- `min` (string, required)
- `max` (string, required)
- `rows_used` (integer, required)

## Limits

- max input bytes: 256000
- max data rows: 5000
- max integer digits: 256

## Example

Request input:

```json
{
  "csv": "n\n1\n-2\n10\n",
  "column": "n"
}
```

Response:

```json
{
  "result": {
    "min": "-2",
    "max": "10",
    "rows_used": 3
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "csv-min-max-integers",
  "version": "1.0.0",
  "input": {
    "csv": "n\n1\n-2\n10\n",
    "column": "n"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/csv-min-max-integers/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"csv":"n\n1\n-2\n10\n","column":"n"}'
```

The machine-readable contract is at [/v1/tools/csv-min-max-integers/versions/1.0.0](/v1/tools/csv-min-max-integers/versions/1.0.0).

### CLI

```sh
node cli.mjs run csv-min-max-integers 1.0.0 --input input.json --base-url https://computefirst.net
```

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

## Related tools

- [CSV sum integers](/tools/csv-sum-integers): Sum a CSV column of strict signed base-10 integer strings using BigInt.
- [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 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 scale integer column](/tools/csv-scale-integer-column): Multiply every data cell in a named CSV column by a canonical integer factor.
- [CSV add row number](/tools/csv-add-row-number): Prepend a 1-based row_number column of canonical integer strings.
- [CSV anti join](/tools/csv-anti-join): Keep left CSV rows whose exact key tuples do not appear in the right document.
