add_chapter
Insert new chapters into knowledge documents with precise positioning. Use this tool to expand documentation, add examples, or include reference material while maintaining logical flow.
Instructions
Add a new chapter to an existing knowledge document with positioning control.
When to use this tool:
- Expanding document with new topics
- Adding examples or case studies
- Including additional reference material
- Inserting clarifying chapters
- Growing documentation organically
Key features:
- Flexible positioning (before/after/end)
- Maintains document flow
- Maximum 50 chapters per document
- Reference-based positioning
You should:
- Choose clear, descriptive chapter titles
- Position chapter logically in document flow
- Keep chapters focused on single topics
- Use reference_chapter for precise placement
- Consider reader's journey through document
- Check current chapter count (max 50)
- Include practical, actionable content
DO NOT use when:
- Chapter already exists
- Document has 50 chapters already
- Content belongs in existing chapter
Position options: "before", "after", "end" (default) Returns: {success: bool, message?: str, error?: str}
Input Schema
Name | Required | Description | Default |
---|---|---|---|
chapter_title | Yes | Title for the new chapter | |
content | Yes | Content for the new chapter | |
filename | Yes | Knowledge file name (must include .md extension) | |
position | No | Where to insert the chapter (default: "end") | |
project_id | Yes | The project identifier | |
reference_chapter | No | The chapter title to use as reference point for before/after positioning |