Skip to main content
Glama

Text Chunk

text_chunk
Read-only

Split a long text into chunks for retrieval (RAG): split on paragraphs, then sentences, then words, each chunk within maxTokens (default 500) with the overlap you ask for (default 50 tokens). Each chunk has its index, text, start and end character offsets and an estimated token count (characters divided by 4, a rough rule for English). Up to 1 MB and 2,000 chunks. Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
textYesThe text, up to 1 MB (JSON body field)
overlapNoTokens shared by neighbouring chunks, 0 up to maxTokens minus 1, default 50
maxTokensNoLargest chunk in estimated tokens, 20 to 8000, default 500

Output Schema

NameRequiredDescriptionDefault
countNo
chunksNo
sourceNo
overlapNo
checkedAtNo
maxTokensNo
tokenEstimateNo

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?

Goes well beyond the readOnly/openWorld annotations: hard caps (1 MB input, 2,000 chunks), the token estimation heuristic (chars/4, English-oriented), payment rail and price, and the fact that failed calls are not charged. Omitting that this is a paid x402 endpoint would have been a real failure; the only gap is no mention of latency or rate limits.

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

Conciseness4/5

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

Front-loads the operation and splitting strategy, then packs the limits and output fields, then payment. Dense but each sentence carries operational weight; the pricing sentence is long but necessary for a paid tool.

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

Completeness4/5

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

An output schema exists, so return-value explanation is largely redundant, yet the description still enumerates chunk fields (index, text, offsets, token estimate) helpfully. With a simple 3-parameter tool and full annotations, an agent has everything needed to call 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 coverage is 100%, so the schema already documents text, overlap, and maxTokens with their bounds and defaults. The description restates the defaults and, usefully, explains that 'tokens' means characters divided by four, which clarifies what maxTokens actually counts. That is a modest addition over a fully documented schema, so baseline 3 fits.

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 a long text into chunks for retrieval') and immediately discloses the splitting hierarchy (paragraphs, then sentences, then words). This cleanly separates it from the many other text_* siblings, which transform or analyze text rather than segment it.

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?

The parenthetical '(RAG)' pins down the intended use case, which is the main routing signal an agent needs among ~180 siblings. It does not name a when-not condition or point to a complementary tool such as embed or rerank, so it stops short of full alternative routing.

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