Skip to main content
Glama

move_work_item_to_document

Destructive

Move a work item into a Polarion document at a specific position, inserting it after or before a given part, or appending it to the end.

Instructions

Move a work item into a Polarion document at a specific position.

moveToDocument atomically sets module + outline_number and inserts a part — the ONLY supported attach path (macro-injection leaves module unset). Headings rejected (HTTP 400). Already-in-a-document items are moved, not copied; detach via move_work_item_from_document.

AT MOST one of previous_part_id (AFTER) / next_part_id (BEFORE); omit both to append. Discover part IDs via read_document_parts.

Side effect: auto-creates one outgoing link to the enclosing heading (project-config role); collides with a same-role create_work_item_links (phantom success). Removed on detach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject containing the work item.
work_item_idYesShort ID of an EXISTING work item (e.g. 'MCPT-042').
target_space_idYesTarget space ID (use '_default' for the default space).
target_document_nameYesTarget document name within ``target_space_id``.
previous_part_idNoInsert AFTER this part ID; mutually exclusive with ``next_part_id``. Omit both to append at the end of the target document.
next_part_idNoInsert BEFORE this part ID; mutually exclusive with ``previous_part_id``. Omit both to append at the end of the target document.
dry_runNoWhen True, return payload preview without calling Polarion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
movedYes
dry_runYes
payload_previewYes
Behavior5/5

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

Discloses atomically setting module+outline_number, insertion as only attach path, side effect of auto-creating link and collision, heading rejection, and dry_run behavior, all beyond annotations which only indicate destructiveness.

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?

Description is well-structured with front-loaded purpose and detailed subsections, but some redundancy (e.g., repeating 'Move a work item') could be trimmed, making it slightly less concise.

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 with 7 parameters, destructive action, and side effects, the description comprehensively covers operation, constraints, alternatives, and edge cases, with output schema handling return values.

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?

Input schema covers 100% of parameters. Description adds value by explaining mutual exclusivity of previous_part_id/next_part_id and how to discover part IDs via read_document_parts, but returns 3 baseline with slight addition.

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?

Description clearly states the tool moves a work item into a Polarion document at a specific position, with explicit mention of the sibling tool for detach, differentiating it from other tools.

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?

Description provides explicit when-to-use (move items into documents) and when-not-to-use (headings rejected), plus alternative for detach (move_work_item_from_document) and collision warning with create_work_item_links.

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