Text sentences chunk

text-sentences-chunk · version 1.0.0 · Text · free, no key needed

Pack whole UAX #29 sentences into chunks of at most max_size code points, UTF-16 units or UTF-8 bytes.

Use when you need to: chunk text by sentences · split a document into sentence-aligned chunks for embeddings · group sentences under a size budget.

Decide before calling

Read the versioned contract and the supported scope below. Reuse text-sentences-chunk@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use text-sentences-chunk@1.0.0 for chunk text by sentences. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "text": "One. Two two. Three three three.",
  "max_size": 14
}

Response:

{
  "result": {
    "data_version": "unicode-17.0.0",
    "unit": "code_point",
    "max_size": 14,
    "overlap": 0,
    "sentence_count": 3,
    "count": 2,
    "chunks": [
      {
        "text": "One. Two two. ",
        "start": 0,
        "end": 14,
        "size": 14,
        "first_sentence": 0,
        "sentence_count": 2,
        "oversized": false
      },
      {
        "text": "Three three three.",
        "start": 14,
        "end": 32,
        "size": 18,
        "first_sentence": 2,
        "sentence_count": 1,
        "oversized": true
      }
    ]
  }
}

How to call it

MCP

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

{
  "id": "text-sentences-chunk",
  "version": "1.0.0",
  "input": {
    "text": "One. Two two. Three three three.",
    "max_size": 14
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/text-sentences-chunk/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"One. Two two. Three three three.","max_size":14}'

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

CLI

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

Get the client at /clients/cli/.