Skip to main content
Glama

text_chunk

Split text or Markdown into RAG-ready chunks using token-based sizing, heading-aware boundaries, and optional overlap. Prepares content for vector database embedding.

Instructions

Split text or Markdown into RAG-ready chunks: token-based sizing, heading-aware boundaries, optional overlap, heading path and page metadata per chunk. The standard preprocessing step before embedding into a vector DB. $0.01.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText or Markdown to chunk
overlapNo
split_onNoheading
max_tokensNo
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It does disclose key behaviors: token-based sizing, heading-aware boundaries, optional overlap, and per-chunk metadata. However, it does not mention edge cases like how empty text is handled, whether the operation is stateless, or any rate limits. The '$0.01' pricing hint is a useful behavioral signal but not a full disclosure.

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 with zero waste. The core action and output type are front-loaded, followed by the key features, then the use case and pricing. Every sentence earns its place.

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?

For a 5-parameter tool with no output schema and no annotations, the description covers the main behavioral aspects and use case. It is missing details about return format (though no output schema exists, so the description could have mentioned what the chunks look like) and the idempotency_key parameter. Still, the description is strong enough for an agent to select and invoke the tool correctly in most RAG scenarios.

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 description coverage is only 20%, so the description must compensate. It does add meaning by explaining the purpose of the parameters: 'token-based sizing' maps to max_tokens, 'optional overlap' maps to overlap, 'heading-aware boundaries' maps to split_on. However, it does not explain idempotency_key at all, and the parameter descriptions in the schema are minimal. The description adds significant value but leaves one parameter completely unexplained.

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 states a specific verb ('Split') and resource ('text or Markdown'), and immediately names the output type ('RAG-ready chunks') with concrete features (token-based sizing, heading-aware boundaries, optional overlap, heading path and page metadata). It clearly distinguishes itself from sibling conversion tools like pdf_to_markdown or url_to_markdown by framing it as the preprocessing step before embedding into a vector DB.

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 description explicitly identifies the use case: 'The standard preprocessing step before embedding into a vector DB.' This gives clear context for when to use it. However, it does not explicitly state when not to use it or name alternative tools for non-RAG chunking needs, so it falls just short of a 5.

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