Skip to main content
Glama

update_document

DestructiveIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
typeNoNew document type (e.g. 'req_specification').
titleNoNew document title.
statusNoNew status; prefer workflow_action for real transitions.
dry_runNoPreview payload without writing; guards still query Polarion.
space_idYesSpace ID ('_default' = default space).
project_idYesPolarion project ID.
auto_suspectNoFlag linked work items suspect on change.
custom_fieldsNoPartial; rich-text values as {'type':'text/html','value':...}.
document_nameYesDocument name within space_id.
workflow_actionNoWorkflow action ID.
home_page_content_htmlNoNew 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_typesNoWork item type IDs that render their fields in this document; REPLACES the current set, so pass every type to keep.
uses_outline_numberingNoEnable auto outline numbers (1, 1.1, ...).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runYes
updatedYes
payload_previewYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond annotations by explaining PATCH semantics ('omitted fields stay unchanged'), raw HTML handling ('empty string rejected, pass '<p></p>''), and rendering_layout_types replacement behavior. Also warns about validation of status/type ids and custom_fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but efficiently structured: purpose first, then PATCH semantics, HTML guidance, body rules, and layout/workflow constraints. Every sentence carries essential information for safe usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (13 parameters) and rich schema, the description is comprehensive: it covers edge cases (empty string rejection), alternative tools, and validation rules. It fully prepares an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds meaningful cross-parameter constraints (e.g., workflow_action must pair with an attribute) and source guidance (home_page_content_html from get_document). This pushes it above baseline, though some parameters rely solely on schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

'Update a document's metadata or body' clearly states the action and resource. It distinguishes from siblings by explicitly directing users to other tools for body text and work items: 'For body text or work items use create_work_items + move_work_item_to_document, NOT this tool.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'read BEFORE writing' and detailed when-to-use guidance. It names alternatives for body text and attachments, and specifies constraints like 'workflow_action must pair with at least one attribute' and 'resolve ids via list_document_enum_options'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/devemberx/mcp-server-polarion'

If you have feedback or need assistance with the MCP directory API, please join our Discord server