Save chunks to a JSONL file
save_chunks_jsonlSplit a Markdown file into chunks and save them as a JSONL file, one chunk per line, for search indexes, vector databases, or downstream programs without modifying the source.
Instructions
Split a Markdown file into chunks and save them as a JSONL file (one chunk per line).
Use this when the chunks are going into a search index, vector database or another program, and you want a file instead of a long chat reply. The chunks are the same as chunk_markdown gives. It writes only the one .jsonl file and replaces it if it is already there. It never changes the Markdown file.
Do not use it to look at chunks in the chat (use chunk_markdown).
Returns {"output_path", "chunks", "bytes", "biggest_chunk_chars"}.
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": {
"path": "<path>"
},
"name": "save_chunks_jsonl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Full path to the local Markdown file to split (UTF-8, up to 10 MB). | |
| max_chars | No | Biggest chunk size in characters (not tokens). Default 1500. | |
| output_path | No | Where to save. Must end in .jsonl. Default: next to the input, as NAME.chunks.jsonl. | |
| prefix_path | No | If true, each chunk text starts with its heading path, like "Guide > Install". | |
| overlap_chars | No | Characters repeated from the end of one part at the start of the next, only when a section is split. Must be at most half of max_chars. Default 0. |