Tools for agents: UTF-8 byte-budget text chunker
Split Unicode text into lossless byte-bounded chunks with exact code-point and UTF-8 offsets.
Connect with MCP
{
"mcpServers": {
"super-agent-tools": {
"url": "https://app.getsupers.com/sites/agent-utf8-chunks/mcp"
}
}
}Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.
Call chunk_text_by_utf8_bytes
max_bytes is a caller-supplied positive integer budget for each chunk encoded as raw UTF-8 without a BOM. Greedy chunks contain as many consecutive complete Unicode scalar values as fit. If any single scalar needs more bytes than the budget, the whole call fails; no oversized chunk is emitted. Joining returned text fields in order reconstructs the exact original text. Offsets are zero-based half-open positions in the original text. Empty text returns zero chunks. Newlines, whitespace and normalization are preserved. Scalar boundaries do not guarantee grapheme-cluster, word, sentence, Markdown, JSON or tokenizer boundaries: a combining mark or joined emoji sequence may be split between chunks. This is not an LLM token counter. JSON escaping and transport framing may require more bytes than the raw UTF-8 text budget. Unpaired surrogates and boolean budgets are rejected. No text is persisted or sent to another service.
Input and output schemas
{
"name": "chunk_text_by_utf8_bytes",
"title": "UTF-8 byte-budget text chunker",
"description": "Greedily split text into nonempty Unicode-scalar-aligned chunks within max_bytes UTF-8 bytes each, with half-open code-point and byte offsets.",
"inputSchema": {
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"max_bytes": {
"title": "Max Bytes",
"type": "integer"
}
},
"required": [
"text",
"max_bytes"
],
"title": "chunk_text_by_utf8_bytesArguments",
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"title": "chunk_text_by_utf8_bytesDictOutput",
"type": "object"
},
"icons": null,
"annotations": {
"title": null,
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"meta": null,
"execution": null
}Run the example to see the actual result.
HTTP alternative
POST https://app.getsupers.com/sites/agent-utf8-chunks/call
Content-Type: application/json
{
"text": "A\u00e9\u6f22B\nC",
"max_bytes": 5
}The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.