# Integer is perfect square

`integer-is-perfect-square` · version 1.0.0 · Numbers & math · free, no key needed

Test whether a non-negative integer string is a perfect square.

**Use when you need to: integer is perfect square · perfect square test · check if a number is a perfect square.**

## Supported

- integer is perfect square
- perfect square test
- check if a number is a perfect square

## Not supported

- negative input
- floating-point square root
- nth power test

## Behavior

- value is a canonical non-negative integer string: 0 or a non-zero leading digit followed by digits, at most 1000 digits.
- Negative values are rejected.
- 0 and 1 are perfect squares (0*0 and 1*1).
- is_perfect_square is computed exactly via integer floor square root (no floating point), never approximated.

## Input

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

## Output

- `is_perfect_square` (boolean, required)

## Limits

- max digits: 1000

## Example

Request input:

```json
{
  "value": "49"
}
```

Response:

```json
{
  "result": {
    "is_perfect_square": true
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "integer-is-perfect-square",
  "version": "1.0.0",
  "input": {
    "value": "49"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/integer-is-perfect-square/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"value":"49"}'
```

The machine-readable contract is at [/v1/tools/integer-is-perfect-square/versions/1.0.0](/v1/tools/integer-is-perfect-square/versions/1.0.0).

### CLI

```sh
node cli.mjs run integer-is-perfect-square 1.0.0 --input input.json --base-url https://computefirst.net
```

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

## Related tools

- [Integer is prime](/tools/integer-is-prime): Deterministically test whether a non-negative integer string is prime.
- [Integer divisors](/tools/integer-divisors): List every positive divisor of a positive integer, ascending.
- [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.
- [Integer catalan number](/tools/integer-catalan-number): Compute the nth Catalan number exactly.
- [Integer digit sum](/tools/integer-digit-sum): Sum the base-b digits of the magnitude of an integer string.
