Skip to main content
Glama

update_document

DestructiveIdempotent

Update a Polarion document's metadata or body. Supply only the attributes to change; omit those left unchanged.

Instructions

Update a Polarion document's metadata or body.

PATCHes only supplied attributes (omitted preserved); no follow-up GET. Fetch via get_document BEFORE updating. home_page_content_html is never sanitized or converted — source from get_document(include_homepage_content_html=True); blocks lacking an id= get one auto-stamped, a fully anchored body is sent byte-for-byte. Empty string rejected (orphans headings) — 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, links, TOC/TOF widgets, page breaks) must be adapted from get_html_recipes templates, never hand-written.

workflow_action must pair with ≥1 attribute (else 400). Unknown status/type raise ValueError; custom_fields keys outside the document type's schema are rejected, values NOT validated — resolve via list_document_enum_options first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoNew document type (e.g. 'req_specification').
titleNo
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_homepage_content_html=True); '' rejected; anchorless blocks get id= auto-stamped. New tables, captions, 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?

Beyond annotations (destructiveHint, idempotentHint, openWorldHint), description explains PATCH behavior (only supplied attributes, no follow-up GET), rejects empty strings, describes error conditions for workflow_action, status, custom_fields. 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 clear sections, but somewhat lengthy. However, given complexity (12 parameters, many rules), the length is justified. Front-loaded with core purpose, then detailed rules.

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?

Covers all aspects: prerequisites, error handling, interaction with sibling tools, parameter nuances. Output schema existence reduces need for return value explanation. No gaps identified.

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?

Adds significant meaning beyond schema: explains auto-stamping of anchorless blocks for home_page_content_html, how to pass rich-text for custom_fields, dry_run behavior, and constraints on workflow_action. Schema coverage is 92%, but description enriches understanding.

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?

Clearly states 'Update a Polarion document's metadata or body.' Uses specific verb (PATCH) and resource (document). Differentiates from sibling tools by explicitly stating when to use other tools (e.g., 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?

Provides explicit guidance: fetch before update, source home_page_content_html from get_document, use get_html_recipes for new constructs, avoid for body text/work items. States when-not-to-use and references alternatives.

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