Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

split_chunks

Read-onlyIdempotent

Split text into chunks of at most N tokens (cl100k_base: ~4 chars/token) with optional overlap. Designed for RAG ingestion pipelines.

Input Schema

NameRequiredDescriptionDefault
inputYesText to split into chunks
overlapNoToken overlap between consecutive chunks (default: 0)
chunk_tokensYesMaximum tokens per chunk (10–8000)

Output Schema

NameRequiredDescriptionDefault
chunksNo
chunk_countNo
overlap_tokensNo
tokens_per_chunkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "chunk_tokens": 12,
      +    "input": "Refunds are accepted within 30 days. Damaged items are replaced for free. Contact support to start a return.",
      +    "overlap": 2
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / chunk_tokens / description
      Previous value: -"Maximum tokens per chunk (10–8000)"New value: +"Maximum tokens per chunk (10–8000)"
  3. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "chunk_count": {
      +    "type": "number"
      +  },
      +  "chunks": {
      +    "type": "array"
      +  },
      +  "overlap_tokens": {},
      +  "tokens_per_chunk": {}
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish that this is a safe, read-only, idempotent operation. The description adds useful behavioral context beyond that: tokenization uses cl100k_base with an approximate character-per-token ratio, and overlap is optional. It does not discuss error behavior or output structure, but the output schema covers the latter.

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?

Two sentences, front-loaded with the core action and constraint, with no wasted wording. The intended use case is appended efficiently.

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?

For a simple, read-only chunking utility with full schema coverage and an output schema, the description is sufficiently complete. It covers what the tool does, the tokenization model, overlap, and the primary use case without redundant detail.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all three parameters, including defaults and bounds. The description still adds meaning by identifying the tokenizer (cl100k_base) and the rough character-per-token approximation, which helps an agent reason about chunk_tokens beyond the raw numeric schema.

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

Purpose4/5

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

The description states a specific verb and resource ('Split text into chunks') plus the key constraint ('at most N tokens') and optional overlap. It is clear what the tool does, though it does not explicitly name sibling tools such as truncate_to_tokens or count_tokens to sharpen differentiation.

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?

It gives a clear intended context: 'Designed for RAG ingestion pipelines.' This tells an agent when the tool is appropriate, but it does not state when not to use it or name alternative tools for related token operations.

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.