format_section
Partially update a DOCX section’s page-number restart, page size, orientation, or margins by zero-based index from get_sections while preserving layout and section settings.
Instructions
Partially update one DOCX section’s page-number restart, page dimensions/orientation, or margins using a zero-based section_index from get_sections. Effective calls emit one native w:sectPrChange and preserve section topology, page-number format, columns, break type, and header/footer references. Orientation is literal and does not automatically swap dimensions. This tool does not create sections or edit header/footer content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| margins | No | Partial margin update in twips. All seven values are required when w:pgMar is absent. | |
| file_path | No | Path to the DOCX or ODT file. | |
| page_size | No | Partial page-size update. Both dimensions are required when w:pgSz is absent. | |
| google_doc_id | No | Google Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit | |
| section_index | Yes | Zero-based session-relative index returned by get_sections. | |
| page_number_start | No | Non-negative page number at which this section starts. |