Text count

text-count · version 1.0.0 · Text · free, no key needed

Count Unicode code points, UTF-16 code units, UTF-8 bytes, and lines.

Use when you need to: text count · count code points · utf8 byte length.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "text": "שלום\n"
}

Response:

{
  "result": {
    "code_points": 5,
    "utf16_code_units": 5,
    "utf8_bytes": 9,
    "lines": 1,
    "trailing_terminator": true
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "text-count",
  "version": "1.0.0",
  "input": {
    "text": "שלום\n"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/text-count/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"שלום\n"}'

The machine-readable contract is at /v1/tools/text-count/versions/1.0.0.

CLI

node cli.mjs run text-count 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.