Skip to main content
Glama

Chunk text

text_chunk
Read-onlyIdempotent

Split long text into chunks for a model context window. Cuts at sentence boundaries when possible, then at word boundaries, and never mid-word unless a single word is longer than max_chars. Returns each chunk with exact start/end offsets into the original string plus an optional overlap for context carry-over.

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

NameRequiredDescriptionDefault
textYesThe text to split.
overlapNoCharacters of the previous chunk to repeat, snapped to a word start. At most half of max_chars.
max_charsNoTarget maximum characters per chunk (default 1000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the description's added value is in the chunking algorithm: sentence boundaries first, then words, never mid-word except for oversized words, plus exact offsets and overlap carry-over. This meaningfully discloses how text is transformed and what is returned, though it doesn't describe edge cases like empty input.

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

Conciseness5/5

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

Three sentences, each earning its place: purpose first, then boundary behavior, then return shape. No redundancy or filler.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so (chunks with exact start/end offsets and overlap). Combined with full schema coverage and annotations, an agent has everything needed to invoke it correctly.

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 description coverage is 100%, so all three parameters are already documented. The description adds only marginal meaning by explaining that max_chars governs the word-length exception and that overlap provides 'context carry-over'; otherwise it leans on the schema.

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?

The description opens with a precise verb+resource and a purpose: 'Split long text into chunks for a model context window.' No sibling (text_normalize, text_metrics, text_search, etc.) performs chunking, so the tool is unambiguous without needing to name an alternative.

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

Usage Guidelines3/5

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

Usage is only implied by 'for a model context window,' which hints at when this is useful, but there is no explicit when-to-use/when-not-to-use guidance or reference to any alternative tool. Adequate context, but guidance must be inferred.

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.