get_outline
Identify all headings in a Word document with paragraph index and level, detecting both Heading styles and outline-level overrides for accurate TOC generation and heading edits.
Instructions
List every heading with its paragraph index and level. Detects Heading styles AND w:outlineLvl overrides (direct or style-inherited); detected_via names which. detect_formatted=True adds a heuristic scan for direct-formatted headings (short bold/centered paragraphs). When nothing is detected, returns a note plus flat structure counts, not an empty list. The indices feed the location object's paragraph and outline selectors. Open documents are read live. Read-only. TOC generation and heading surgery: academic pack.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | auto | |
| file_path | Yes | ||
| detect_formatted | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |