Skip to main content
Glama

WritersLogic verifiable AI agents

chunk-boundaries

Split text into chunks under a hard token cap without cutting a table, sentence or code fence — Plans chunk boundaries for text an agent must feed to a model in pieces: every chunk is at most maxTokens in the named tokenizer (o200k_base or cl100k_base, verified by counting each finished chunk), boundaries fall only between sentences, blocks, whole Markdown or HTML tables and whole code fences, headings stay with the text that follows, and the chunks tile the input exactly (concatenating the

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>",
      "maxTokens": "<maxTokens>",
      "tokenizer": "<tokenizer>"
    },
    "name": "chunk-boundaries"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to chunk (Markdown, plain text or HTML tables).
maxTokensYesHard cap per chunk.
tokenizerYeso200k_base or cl100k_base. Any other name (including Claude models) returns status unsupported for items that need counting; caller token counts are always accepted.
includeTextNoAlso return each chunk's text. Default false (slice by span).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources