r7_insert
Insert paragraphs, headings, list items, or page breaks at the start, end, or next to existing paragraphs in a DOCX, with custom alignment, indents, spacing, and fonts.
Instructions
Insert a paragraph, heading, list item, or page break at the start, the end, or relative to another paragraph. The inserted paragraph can carry its own alignment, indents, spacing and font.
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": {
"filePath": "<filePath>"
},
"name": "r7_insert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| list | No | Make the paragraph a bulleted or numbered list item. The numbering part and its relationship are created when the document has none. | |
| runs | No | Mixed formatting inside one paragraph: [{ text, bold, italic, size, color, family, underline }]. | |
| size | No | Font size in points. | |
| text | No | Text to insert. | |
| color | No | Font colour, e.g. "#C00000". | |
| style | No | Paragraph style: Normal, Heading1…Heading6, Title, ListParagraph, or any style name/id the document defines. | |
| family | No | Font name, e.g. "Georgia". | |
| italic | No | ||
| strike | No | ||
| indents | No | Indents in points: { left, right, firstLine, hanging }. | |
| shading | No | Paragraph background, e.g. "#FFF2CC". | |
| spacing | No | Spacing: { before, after } in points and { line, lineRule } for line spacing, where lineRule "auto" makes line a multiple (1.5) and "exact"/"atLeast" make it points. | |
| filePath | Yes | Path to the DOCX file. | |
| keepNext | No | Keep the paragraph with the next one. | |
| position | No | Insertion anchor. | |
| alignment | No | Horizontal alignment ("both" is justified). | |
| highlight | No | Text highlight colour, e.g. "yellow". | |
| isHeading | No | Whether this is a heading. | |
| listLevel | No | List level 0..8 (default 0). | |
| pageBreak | No | Insert a page break (alone, or before the text). | |
| underline | No | true for a single underline, or a style name such as double. | |
| outputPath | No | Optional destination file path. | |
| targetIndex | No | 0-based index when position is before or after. | |
| headingLevel | No | Heading level 1..6 (default 1). | |
| pageBreakBefore | No | Start the paragraph on a new page. |