Text Splitter Tool
Functionality
Split text into specified-sized chunks while maintaining semantic integrity, facilitating subsequent batch processing and analysis.
Usage Scenarios
- Process extra-long text by splitting it into agent-processable segments
- Perform text preprocessing to provide standardized input for subsequent content analysis, summarization, or evaluation tasks
- Optimize text processing workflows to ensure each processing unit is controllable in size and semantically complete
Core Capabilities
- Semantic Integrity Priority: When splitting, avoid truncating sentences or paragraphs; prioritize splitting at natural boundaries (periods, line breaks) to ensure semantic integrity of each chunk
- Preserve Original Format: During splitting, preserve the original format and structure of text, such as Markdown, HTML tags, etc.
- Precise Chunk Size Control: Strictly split according to specified size limits, ensuring each text chunk does not exceed the preset maximum length
- Multiple Splitting Strategies: Support various splitting strategies based on character count, token count, paragraph count, or specific delimiters
Input Requirements
- Text Content: Original text to be split
- Chunk Size Limit: Maximum length of each text chunk (recommend providing character count or token count)
- Splitting Strategy (optional): Specify preferred splitting strategy, such as split by sentence, split by paragraph, split by specific delimiter, etc.
Output Format
[Text Splitting Report]
- Original text length: [integer] words/tokens
- Target chunk size: [integer] words/tokens
- Actual number of chunks: [integer] chunks
### Splitting Results
- Chunk 1 (length: [integer] words/tokens): "[content preview...]"
- Chunk 2 (length: [integer] words/tokens): "[content preview...]"
- Chunk 3 (length: [integer] words/tokens): "[content preview...]"
...
Constraints
- Splitting results must strictly comply with specified chunk size limits
- Ensure maximum preservation of text semantic integrity during splitting
- Output format must be structured, clearly displaying content and length of each text chunk
- Avoid introducing any extra information or explanations in output; only provide splitting results
Examples
See {baseDir}/references/examples.md for more detailed examples:
examples.md - Contains splitting examples for different lengths, different splitting strategies, and complex text structures
Detailed Documentation
See {baseDir}/references/examples.md for detailed guidance and cases on the text splitter tool.
Version History
| Version |
Date |
Changes |
| 2.1.0 |
2026-01-11 |
Optimized description field; changed model to opus; optimized descriptions for functionality, core capabilities, input requirements, and output format; added usage scenarios, constraints, examples, and detailed documentation sections |
| 2.0.0 |
2026-01-11 |
Restructured according to official specifications |
| 1.0.0 |
2026-01-10 |
Initial version |
1---2name: text-splitter3description: Split text into specified-sized chunks while maintaining semantic integrity. Suitable for long text batch processing, dividing text into processable segments4license: MIT5---6
7# Text Splitter Tool
8
9## Functionality
10
11Split text into specified-sized chunks while maintaining semantic integrity, facilitating subsequent batch processing and analysis.
12
13## Usage Scenarios
14
15- Process extra-long text by splitting it into agent-processable segments
16- Perform text preprocessing to provide standardized input for subsequent content analysis, summarization, or evaluation tasks
17- Optimize text processing workflows to ensure each processing unit is controllable in size and semantically complete
18
19## Core Capabilities
20
21- **Semantic Integrity Priority**: When splitting, avoid truncating sentences or paragraphs; prioritize splitting at natural boundaries (periods, line breaks) to ensure semantic integrity of each chunk
22- **Preserve Original Format**: During splitting, preserve the original format and structure of text, such as Markdown, HTML tags, etc.
23- **Precise Chunk Size Control**: Strictly split according to specified size limits, ensuring each text chunk does not exceed the preset maximum length
24- **Multiple Splitting Strategies**: Support various splitting strategies based on character count, token count, paragraph count, or specific delimiters
25
26## Input Requirements
27
28- **Text Content**: Original text to be split
29- **Chunk Size Limit**: Maximum length of each text chunk (recommend providing character count or token count)
30- **Splitting Strategy** (optional): Specify preferred splitting strategy, such as split by sentence, split by paragraph, split by specific delimiter, etc.
31
32## Output Format
33
34```
35[Text Splitting Report]
36
37- Original text length: [integer] words/tokens
38- Target chunk size: [integer] words/tokens
39- Actual number of chunks: [integer] chunks
40
41### Splitting Results
42- Chunk 1 (length: [integer] words/tokens): "[content preview...]"
43- Chunk 2 (length: [integer] words/tokens): "[content preview...]"
44- Chunk 3 (length: [integer] words/tokens): "[content preview...]"
45...
46```
47
48## Constraints
49
50- Splitting results must strictly comply with specified chunk size limits
51- Ensure maximum preservation of text semantic integrity during splitting
52- Output format must be structured, clearly displaying content and length of each text chunk
53- Avoid introducing any extra information or explanations in output; only provide splitting results
54
55## Examples
56
57See `{baseDir}/references/examples.md` for more detailed examples:
58- `examples.md` - Contains splitting examples for different lengths, different splitting strategies, and complex text structures
59
60## Detailed Documentation
61
62See `{baseDir}/references/examples.md` for detailed guidance and cases on the text splitter tool.
63
64---
65
66## Version History
67
68| Version | Date | Changes |
69|---------|------|---------|
70| 2.1.0 | 2026-01-11 | Optimized description field; changed model to opus; optimized descriptions for functionality, core capabilities, input requirements, and output format; added usage scenarios, constraints, examples, and detailed documentation sections |
71| 2.0.0 | 2026-01-11 | Restructured according to official specifications |
72| 1.0.0 | 2026-01-10 | Initial version |