Generate overlapping text chunks with character offsets
text_chunkSplit a long text into chunks for retrieval (RAG): split on paragraphs, then sentences, then words, each chunk within maxTokens (default 500) with the overlap you ask for (default 50 tokens). Each chunk has its index, text, start and end character offsets and an estimated token count (characters divided by 4, a rough rule for English). Up to 1 MB and 2,000 chunks. Related tools on this server, for a different need: text_diff when you need to find differences between two texts by line, word or character; text_faq when you need to generate FAQ pairs grounded in a text with checked quotes. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
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 | The text, up to 1 MB (JSON body field) | |
| overlap | No | Tokens shared by neighbouring chunks, 0 up to maxTokens minus 1, default 50 | |
| maxTokens | No | Largest chunk in estimated tokens, 20 to 8000, default 500 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| chunks | No | ||
| source | No | ||
| overlap | No | ||
| checkedAt | No | ||
| maxTokens | No | ||
| tokenEstimate | No |