Skip to main content
Glama

update_document

DestructiveIdempotent

Partially update a Polarion document's metadata or body by supplying only the fields to change. Fetch the document first to preserve unchanged attributes.

Instructions

Update a document's metadata or body.

PATCHes only supplied attributes — omitted fields stay unchanged. Fetch via get_document BEFORE updating. 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 the work item's module unset — attach via move_work_item_to_document.

  • Polarion-specific constructs (tables, captions, image embeds, links, TOC/TOF widgets, page breaks) must be adapted from get_html_recipes templates, never hand-written. attachment:{id} image refs must name an existing attachment — confirm via list_document_attachments first.

workflow_action must pair with at least one attribute. Unknown status/type ids and custom_fields keys outside the type schema are rejected, values are not validated — resolve via list_document_enum_options first.

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.
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?

Describes detailed behaviors beyond annotations: PATCH semantics, empty string rejection, requirement to source HTML verbatim from get_document, and prohibitions on hand-writing Polarion constructs. No contradiction with annotations.

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

Conciseness4/5

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

Well-structured with sections and bullet points, front-loaded purpose. Slightly verbose but every sentence adds value. Could be more concise but is clear.

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?

Comprehensive coverage given complexity: prerequisites, alternatives, behavioral rules, parameter conventions, and output schema exists. No gaps for an AI agent to infer.

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

Parameters5/5

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

Despite 100% schema coverage, the description adds substantial meaning: explains home_page_content_html sourcing and empty rejection, custom_fields format, dry_run preview, and workflow_action pairing requirement.

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?

The description clearly states it updates a document's metadata or body, specifies PATCH behavior, and distinguishes from sibling tools like create_work_items + move_work_item_to_document for body text.

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?

Explicit guidance on when to use (update after get_document) and when not (for body text or work items). Provides prerequisites (confirm attachments, adapt HTML from get_html_recipes) and constraints (workflow_action must pair with attribute, unknown ids rejected).

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