Insert Line Near Text
insert_line_or_paragraph_near_textInsert a new line or paragraph with optional style before or after a target paragraph specified by text or index in a Word document.
Instructions
Insert a new line or paragraph (with specified or matched style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), line_text (str), position ('before' or 'after'), line_style (str, optional), 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_line_or_paragraph_near_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| target_text | No | ||
| line_text | No | ||
| position | No | after | |
| line_style | No | ||
| target_paragraph_index | No |