{"id":"text-paragraphs-split","version":"1.0.0","description":"Split text into paragraphs separated by blank lines (CommonMark line rules) with code point spans and line numbers.","supported_operations":["split text into paragraphs","chunk a document by blank lines","paragraph boundaries with character offsets","which lines belong to each paragraph","break plain text into paragraph chunks for embedding","count paragraphs separated by empty lines"],"unsupported_operations":["Markdown block parsing (headings, lists, code blocks are not recognized here; see markdown-sections-chunk)","sentence or token-size chunking, overlap windows, or merging short paragraphs","treating lines of non-breaking or other Unicode spaces as blank (only spaces and tabs count)"],"semantics":["Lines follow CommonMark 0.31.2 section 2.1: a line ending is LF, CR not followed by LF, or CRLF; a final line ending does not start another line. A blank line contains nothing or only spaces (U+0020) and tabs (U+0009).","A paragraph is a maximal run of consecutive non-blank lines. Its span runs from the first character of its first line to the end of its last line's content: inner line endings and indentation are kept verbatim; the last line ending and the surrounding blank lines are excluded.","Offsets start and end are Unicode code point indices into text (end exclusive). Line numbers are 1-based: line(pos) = 1 + number of line endings that end at or before pos; start_line = line(start), end_line = line(end - 1). line_count = end_line - start_line + 1.","Paragraphs are listed in document order with index 0..n-1. Empty text or text with only blank lines gives no paragraphs. line_count_total counts every CommonMark line of the input, blank or not.","No Markdown interpretation: an indented line, a \"#\" line or a \"---\" line is ordinary paragraph text. Lone surrogates in text throw invalid_input."],"limits":{"max_input_bytes":262144,"max_paragraphs":10000,"max_output_bytes":1048576},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","description":"The text to split (UTF-8, at most max_input_bytes)."}}},"output_schema":{"type":"object","additionalProperties":false,"required":["paragraph_count","line_count_total","paragraphs"],"properties":{"paragraph_count":{"type":"integer","minimum":0},"line_count_total":{"type":"integer","minimum":0},"paragraphs":{"type":"array","maxItems":10000,"items":{"type":"object","additionalProperties":false,"required":["index","start","end","start_line","end_line","line_count","text"],"properties":{"index":{"type":"integer","minimum":0},"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0},"start_line":{"type":"integer","minimum":1},"end_line":{"type":"integer","minimum":1},"line_count":{"type":"integer","minimum":1},"text":{"type":"string"}}}}}},"examples":[{"input":{"text":"aaa\nbbb\n\nccc\nddd\n"},"output":{"paragraph_count":2,"line_count_total":5,"paragraphs":[{"index":0,"start":0,"end":7,"start_line":1,"end_line":2,"line_count":2,"text":"aaa\nbbb"},{"index":1,"start":9,"end":16,"start_line":4,"end_line":5,"line_count":2,"text":"ccc\nddd"}]}},{"input":{"text":"שלום עולם\r\n \t \r\n😀 end"},"output":{"paragraph_count":2,"line_count_total":3,"paragraphs":[{"index":0,"start":0,"end":9,"start_line":1,"end_line":1,"line_count":1,"text":"שלום עולם"},{"index":1,"start":16,"end":21,"start_line":3,"end_line":3,"line_count":1,"text":"😀 end"}]}}],"execute_url":"/v1/tools/text-paragraphs-split/versions/1.0.0/execute"}