Skip to main content
Glama

text_chunk

Read-only

Text chunker for RAG — Split a document into embedding-ready chunks that respect paragraph and sentence boundaries. Pass text= or url= (readable page text is extracted first, up to 40,000 characters). Optional: size= target tokens per chunk (50-4000, default 400), overlap= tokens carried into the next chunk (default 12% of size, max half), mode=sentence|paragraph|token, max_chunks= (default 200, max 500). Returns each chunk with text, character offsets, word and token estimates and overlap, plus size stats. Pairs with /v1/embeddings and /v1/rerank. Price: $0.002 USDC (Base, via x402).

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": {
      "url": "<url>"
    },
    "name": "text_chunk"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYeshttps://en.wikipedia.org/wiki/Retrieval-augmented_generation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/non-destructive, so the description's real contribution is the operational detail: 40,000-character extraction cap, defaults and ranges for size/overlap/mode/max_chunks, the return payload shape, and the $0.002 x402 price. That is genuinely useful behavioral context. However, the claim that you can 'Pass text= or url=' contradicts the schema, which only accepts url, undermining trust in the rest of the disclosure.

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-loaded with the core purpose, then the input rule, then optional tuning, then return values and price. Dense but each sentence carries information; the optional-parameter run-on is the only slightly crowded part.

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?

For a single-parameter tool with no output schema, it does well to describe return fields and pricing. But the description and schema disagree on the accepted inputs, leaving the agent unsure whether text=, size=, or mode= are actually usable — a completeness failure that matters more than the missing return schema.

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

Parameters2/5

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

The schema has exactly one parameter (url) at 100% coverage, yet the description advertises size, overlap, mode, and max_chunks as if they were inputs — none of which exist in the schema. It also presents text= as an accepted alternative to url=. This is misleading rather than additive, since an agent following the description would attempt arguments the tool does not accept.

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 document into embedding-ready chunks' — plus the RAG context and boundary-awareness. The purpose is unambiguous and distinct from a summarizer or diff tool.

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?

Gives clear usage context by naming its downstream partners ('Pairs with /v1/embeddings and /v1/rerank'), which tells the agent where this fits in a pipeline. It stops short of explicit when-not guidance or a direct contrast with the similarly named util_text_chunk sibling.

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