insert_glossary
Inserts an alphabetized glossary into a Word document by extracting defined terms and their definitions, flagging unextractable ones with [DEFINITION NEEDED] for manual completion.
Instructions
Build a glossary section from the document's defined terms (same detection as check_defined_terms): a heading plus one alphabetized paragraph per term, term in bold, definition harvested from the defining sentence. Terms whose definition cannot be extracted cleanly get a [DEFINITION NEEDED] marker instead of a mangled fragment; the result lists them for manual completion. Placed at the body end by default, or after body paragraph after_index. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at_end | No | ||
| backup | No | ||
| heading | No | Glossary | |
| file_path | Yes | ||
| after_index | No | ||
| heading_level | No | ||
| definition_patterns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||