# Array integer min max

`array-integer-min-max` · version 1.0.0 · Numbers & math · free, no key needed

Return the numeric minimum and maximum of canonical integer strings.

**Use when you need to: array integer min max · minimum and maximum of integers · integer array bounds.**

## Supported

- array integer min max
- minimum and maximum of integers
- integer array bounds

## Not supported

- index of min
- floating comparison
- mean
- csv column min max

## Behavior

- Input values is a non-empty array of canonical base-10 integer strings with at most 10000 items.
- A canonical integer is 0 or an optional ASCII minus followed by a non-zero leading digit and only digits after that.
- Input -0 is accepted and canonicalized to 0; plus signs, spaces, underscores, hex, exponents, empty strings, and other leading zeros are rejected.
- Each value is parsed with BigInt. IEEE-754 numbers are rejected. Comparison is numeric, not lexicographic.
- min and max are the canonical integer strings of the numeric minimum and maximum.
- Ties keep the tied value; after canonicalization equal numbers are identical strings.

## Input

- `values` (array of string, required): min items 1; max items 10000; each max length 1001; each pattern `^-?(0|[1-9][0-9]*)$`

## Output

- `min` (string, required): max length 1001; pattern `^(0|-?[1-9][0-9]*)$`
- `max` (string, required): max length 1001; pattern `^(0|-?[1-9][0-9]*)$`

## Limits

- max items: 10000
- max digits: 1000

## Example

Request input:

```json
{
  "values": [
    "3",
    "1",
    "1",
    "2"
  ]
}
```

Response:

```json
{
  "result": {
    "min": "1",
    "max": "3"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "array-integer-min-max",
  "version": "1.0.0",
  "input": {
    "values": [
      "3",
      "1",
      "1",
      "2"
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/array-integer-min-max/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"values":["3","1","1","2"]}'
```

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

### CLI

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

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

## Related tools

- [Array rational min max](/tools/array-rational-min-max): Return the reduced numeric minimum and maximum of an array of canonical rationals.
- [Array integer clamp](/tools/array-integer-clamp): Clamp an array of canonical integer strings to optional inclusive min and max bounds.
- [Array integer GCD](/tools/array-integer-gcd): Compute the non-negative greatest common divisor of an array of canonical integer strings.
- [Array integer LCM](/tools/array-integer-lcm): Compute the non-negative least common multiple of an array of canonical integer strings.
- [Array integer mode](/tools/array-integer-mode): Return the most frequent canonical integers, listing every mode in first-seen order.
- [Array integer ranks](/tools/array-integer-ranks): Assign competition (1224) ranks to canonical integers; ties share the minimum rank.
