Text Chunk
text_chunkSplit text into retrieval-ready chunks for RAG and embeddings: recursive (paragraph > line > sentence > clause > word), markdown-aware (splits on headings, keeps the heading path per chunk, respects code fences), sentence, or fixed windows; sized in estimated tokens or characters with overlap. Returns each chunk with Unicode start/end offsets, character and token estimates, plus totals. Deterministic and offline; 200 KB input. Price: $0.005 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/text-chunk
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "text_chunk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text or Markdown to chunk (max 200 KB) | |
| unit | No | tokens (default, estimated ~4 chars/token) or chars | |
| overlap | No | Overlap between consecutive chunks, at most half of chunk_size (default 10%) | |
| strategy | No | recursive (default), markdown, sentence or fixed | |
| chunk_size | No | Max chunk size in the unit (tokens 16-8192, default 512; chars 64-32768, default 2000) | |
| include_text | No | Return chunk text (default true); false returns offsets only |