word_add_heading
Append a heading paragraph to an existing Word document. Specify the heading level (1-9) and text to insert.
Instructions
Append a heading paragraph at the given level (1..9).
Args:
path: Path to an existing .docx.
text: Heading text.
level: Heading level (1 = Heading 1, ..., 9 = Heading 9).
Out-of-range values are rejected with
ERR_INVALID_PARAMS.
folder: Optional base folder for relative paths.
Returns:
{"index": <n>} for the new heading.
Raises:
OfficeMCPError: ERR_INVALID_PARAMS for an out-of-range
level or a non-int level, ERR_FILE_NOT_FOUND
if the file is missing, ERR_UNSUPPORTED_FMT for non-
.docx extensions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| text | Yes | ||
| level | No | ||
| folder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||