optimize_rag_chunks
Split large Markdown or text into header-aware semantic chunks with token counts and section headers for efficient LLM embeddings and context management.
Instructions
Semantic RAG Chunker & Token Optimizer: Splits large scraped web documents into header-aware semantic chunks with token counts and section headers for LLM embeddings and context efficiency.
Args: text_or_markdown: The large Markdown or text string to chunk. max_chunk_chars: Maximum characters per chunk (default 2000 ~500 tokens).
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_or_markdown": "<text_or_markdown>"
},
"name": "optimize_rag_chunks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_chunk_chars | No | ||
| text_or_markdown | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |