update_document
Update a Polarion document's metadata, body, or layout by patching only the supplied attributes, leaving all other fields unchanged.
Instructions
Update a document's metadata or body.
PATCHes only supplied attributes — omitted fields stay unchanged; read BEFORE writing. home_page_content_html is raw Polarion HTML, sent verbatim — source from get_document(include_home_page_content_html=True); an empty string is rejected, pass '' for near-empty.
Body rules:
Inline .. auto-create heading work items — THE way to add a heading. For body text or work items use create_work_items + move_work_item_to_document, NOT this tool.
A polarion_wiki macro name=module-workitem leaves module unset — attach via move_work_item_to_document.
Tables, captions, image embeds, links, TOC/TOF widgets, page breaks must come from get_html_recipes templates, never hand-written. attachment:{id} refs must name a real attachment — confirm via list_document_attachments first.
rendering_layout_types REPLACES the type set get_document returns — pass every type to keep; existing layouts survive.
workflow_action must pair with at least one attribute. Unknown status/type ids and custom_fields keys outside the type schema are rejected — resolve ids via list_document_enum_options, or list_work_item_enum_options for rendering_layout_types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | New document type (e.g. 'req_specification'). | |
| title | No | New document title. | |
| status | No | New status; prefer workflow_action for real transitions. | |
| dry_run | No | Preview payload without writing; guards still query Polarion. | |
| space_id | Yes | Space ID ('_default' = default space). | |
| project_id | Yes | Polarion project ID. | |
| auto_suspect | No | Flag linked work items suspect on change. | |
| custom_fields | No | Partial; rich-text values as {'type':'text/html','value':...}. | |
| document_name | Yes | Document name within space_id. | |
| workflow_action | No | Workflow action ID. | |
| home_page_content_html | No | New body as raw HTML from get_document(include_home_page_content_html=True); '' rejected; anchorless blocks get id= auto-stamped. New tables, captions, images, or other Polarion constructs: call get_html_recipes first and adapt a template. | |
| rendering_layout_types | No | Work item type IDs that render their fields in this document; REPLACES the current set, so pass every type to keep. | |
| uses_outline_numbering | No | Enable auto outline numbers (1, 1.1, ...). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | Yes | ||
| updated | Yes | ||
| payload_preview | Yes |