Skip to main content
Glama

update_document

DestructiveIdempotent

Update a Polarion document's metadata or body content, including title, status, type, custom fields, and workflow actions. Supports dry-run preview of changes.

Instructions

Update a Polarion document's metadata or body.

PATCHes only set attributes (omitted preserved); no follow-up GET — call get_document for refreshed state. home_page_content_html is the round-trip pair for get_document(include_homepage_content_html=True), verbatim, no sanitization (NEVER pass untrusted input). Empty string rejected (orphans headings); pass '<p></p>' for near-empty.

Body-write rules:

  • Headings auto-create: inline <h1>..<h4> become heading work items with module / outline_number set; bare <hN>Title</hN> is safe.

  • Anchorless blocks break parts: <h3>X</h3><p>Body</p> PATCHes 200 but the next read_document_parts returns HTTP 500. Every anchorless <p>/<ul>/<ol>/<table>/<div>/<blockquote>/<pre> needs a unique id= (tool raises ValueError before PATCH, on dry_run too). No auto-stamping here; for body text prefer create_work_items + move_work_item_to_document.

  • No macro references: a polarion_wiki macro name=module-workitem <div> makes a part but leaves the work item's module unset (half attached) — attach via move_work_item_to_document.

Prefer workflow_action over raw status; it MUST pair with ≥1 attribute (empty PATCH 400s). Unknown status / type raise ValueError; a custom_fields key absent from the document type's sampled schema is rejected (a type with no populated customs blocks it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesPolarion project ID.
space_idYesSpace ID (use '_default' for the default space).
document_nameYesDocument name within ``space_id``.
titleNo
statusNoNew workflow status; prefer ``workflow_action`` for real transitions.
typeNoNew document type (e.g. 'req_specification').
home_page_content_htmlNoNew body as raw Polarion HTML (round-trip shape from get_document); '' is rejected.
custom_fieldsNoPartial custom-field update; rich-text values must be ``{'type':'text/html','value':...}``.
workflow_actionNoWorkflow action ID; must be paired with at least one attribute field.
dry_runNoWhen True, return the payload preview without writing; enum/custom-field guards still query Polarion, so the document must be readable and the validation endpoint reachable.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
updatedYes
dry_runYes
payload_previewYes
Behavior5/5

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

The description adds significant behavioral context beyond annotations: PATCH only sets provided attributes, no follow-up GET, empty string rejection, heading auto-creation, anchorless block risks, no macro references, and error conditions for unknown status/type or missing custom_fields schema. Annotations already indicate destructive and idempotent hints, and the description aligns perfectly.

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?

The description is well-structured with headings and bullet points, front-loading the main purpose. However, it is somewhat lengthy; while every sentence is useful, a more concise treatment would earn a 5.

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 tool's complexity (10 parameters, 3 required, output schema exists), the description covers all essential aspects: error modes, side effects, integration with sibling tools, and parameter-specific details. The output schema is not described, but the rules state that the description needn't explain return values when an output schema exists.

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?

With 90% schema coverage, the baseline is 3. The description adds value by explaining the round-trip shape for home_page_content_html, the rich-text format for custom_fields, the requirement for workflow_action to be paired with attributes, and the behavior of dry_run. This goes beyond the schema descriptions.

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 opens with a clear verb+resource: 'Update a Polarion document's metadata or body.' It distinguishes from sibling tools by explicitly mentioning alternatives like get_document for state refresh and 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?

The description provides explicit when-to-use and when-not-to-use guidance. It explains PATCH semantics, recommends preferring workflow_action over raw status, warns against using home_page_content_html with untrusted input, and advises alternatives for body text. It also details prerequisites and error conditions.

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