Skip to main content
Glama

Doc-to-LLM Markdown, Table JSON, RAG Chunker & PII Redactor

rag_semantic_chunker

Split Markdown or plain text into deterministic, heading-aware RAG chunks respecting a target token budget and overlap, with breadcrumb heading paths and SHA-256 hashes.

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": {
      "text": "<text>"
    },
    "name": "rag_semantic_chunker"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesMarkdown or plain text document to chunk.
max_tokensNoTarget maximum estimated tokens per chunk.
overlap_tokensNoEstimated overlap tokens carried from previous chunk.
preserve_headingsNoSplit at Markdown heading boundaries and attach heading breadcrumb paths.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full disclosure burden and mostly meets it: it promises deterministic output, heading-aware boundary splitting, a token budget with overlap, and that chunks carry breadcrumb heading paths and SHA-256 hashes. Gaps remain — it does not state that the operation is side-effect-free, nor how non-heading plain text behaves when preserve_headings is true.

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 front-loaded sentence that states the action first and then the properties (determinism, heading awareness, budget/overlap, breadcrumbs, hashes). No filler, no repetition of the schema.

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 four-parameter, fully documented transformation tool with no output schema, the description covers the important behaviors and hints at the returned chunk metadata (breadcrumbs, hashes). It stops short of describing the shape of the returned collection, which is the main remaining gap given the absence of an output schema.

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 description coverage is 100%, so the parameters (text, max_tokens, overlap_tokens, preserve_headings) are already documented, and the baseline is 3. The description mostly restates that surface without adding interaction semantics, such as what happens when overlap_tokens approaches max_tokens or how token counts are estimated.

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 names a specific verb and resource ('Split Markdown or plain text into ... RAG chunks') and adds discriminating qualifiers: deterministic, heading-aware, token-budgeted, with breadcrumb paths and SHA-256 hashes. That is enough for an agent to distinguish it from the sibling converters/redactors without opening the schema.

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 only implied by the phrase 'RAG chunks' — an agent can infer this is for preparing text for retrieval indexing. There is no explicit when-to-use/when-not guidance, no statement about prerequisites, and no naming of an alternative for related tasks.

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