Insert Header Near Text
insert_header_near_textInserts a styled header before or after a paragraph identified by text or index in a Word document. Use to add section headings at precise locations.
Instructions
Insert a header (with specified style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), header_title (str), position ('before' or 'after'), header_style (str, default 'Heading 1'), target_paragraph_index (int, optional).
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": {
"filename": "<filename>"
},
"name": "insert_header_near_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| target_text | No | ||
| header_title | No | ||
| position | No | after | |
| header_style | No | Heading 1 | |
| target_paragraph_index | No |