Skip to main content
Glama

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

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does substantial work: it discloses that the cap is verified by counting each finished chunk, that boundaries fall only between sentences/blocks/whole tables/code fences, that headings stay attached to following text, and that chunks tile the input exactly. The one gap is the response shape — there is no output schema, and the text is truncated mid-clause ('concatenating the ') so the tiling guarantee and returned span structure are never fully stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical constraint (hard cap, no cut tables/sentences/fences) is front-loaded well, but the body is a single dense run-on clause chain joined by commas and 'and'. It also ends mid-sentence ('concatenating the '), leaving the structure visibly incomplete rather than tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter tool with no annotations and no output schema, the description covers boundary policy and cap enforcement well, which is the hard part. However, it never explains what a caller receives (spans? chunk list? status values per item?) and the truncated ending removes the explicit guarantee about reassembling chunks, so an agent still has to guess at the return contract.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented, including the tokenizer names and the unsupported-status fallback. The description adds only modestly — it clarifies that maxTokens is a hard cap enforced by counting finished chunks — but repeats the tokenizer enum that the schema already lists. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Split text into chunks') plus the defining constraint (hard token cap without cutting tables, sentences or code fences). The second clause re-frames it as planning boundaries for text fed to a model in pieces, which makes the intent unmistakable and distinct from any generic text utility.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly signals the use case: chunking text an agent must feed to a model in pieces, with a hard cap. There is no explicit when-not or named alternative, but the listed siblings are unrelated utilities, so there is nothing to route away from. Guidance is contextual rather than exclusionary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources