Skip to main content
Glama

Chunk text for RAG

chunk_text
Read-onlyIdempotent

Split text into token-bounded chunks on paragraph/sentence boundaries with character offsets, token counts and optional overlap.

Input Schema

NameRequiredDescriptionDefault
textYesText (≤256 KB). URLs are not fetched.
modelNo
encodingNo
chunk_tokensNo
overlap_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add behavior — and it does: boundary-aware splitting on paragraph/sentence boundaries, returned character offsets and token counts, and optional overlap. It omits default values and whether boundaries fall back to hard token cuts when no boundary exists, which is the main behavioral unknown.

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?

A single dense sentence that front-loads the verb and resource and then packs in boundary policy and return fields with zero filler.

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?

With no output schema, the description correctly spells out what comes back (offsets, token counts), which is the most important omission it could have made. But for a 5-parameter tool at 20% schema coverage, it says nothing about model/encoding selection, chunk_tokens defaults, or how overlap interacts with chunk size — an agent would have to guess at several call-shaping details.

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 only 20%, so the description must carry more weight; it does explain overlap_tokens ('optional overlap') and chunk_tokens implicitly ('token-bounded'), and the text constraint (≤256 KB, no URL fetching) is in the schema. But model, encoding (an enum with two choices), and the defaults/relationship between chunk_tokens and overlap_tokens are undocumented anywhere, leaving real gaps.

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?

States a specific verb and resource ('Split text into token-bounded chunks') plus the boundary policy and outputs, which clearly separates it from count_tokens and truncate_to_budget. It stops short of naming those siblings explicitly, so the differentiation is inferable rather than stated.

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 implied by the purpose and title ('Chunk text for RAG') — an agent can infer this is the pre-indexing step rather than the budget-check or truncation step. However, there is no explicit when-to-use, no condition for choosing chunking over truncate_to_budget, and no prerequisites (e.g., call count_tokens first to size chunk_tokens).

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