Skip to main content
Glama

copy_document

Duplicate a document's complete content and work items into a new document name within the same or different project/space.

Instructions

Copy a document, duplicating its structure, body, and contained work items.

Rebuilding via create_document/update_document loses the contained items. target_document_name must be free at the destination — check list_documents first. Destination defaults to the source project/space.

link_original_items_with_role is validated against the TARGET project's workitem-link-role enum; remove_outgoing_links strips links carried over from the source.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview payload without writing; guards still query Polarion.
revisionNoCopy the source as of this revision (HEAD if omitted).
space_idYesSource space ID ('_default' = default space).
project_idYesSource project ID.
document_nameYesSource document name.
target_space_idNoDestination space (source space if omitted).
target_project_idNoDestination project (source project if omitted).
target_document_nameYesNew document name; must not already exist at the destination.
remove_outgoing_linksNoStrip outgoing links from copied items (kept if omitted).
link_original_items_with_roleNoLink each copied item back to its original with this workitem-link-role id (e.g. 'duplicates').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
copiedYes
dry_runYes
document_nameYes
payload_previewYes
target_space_idYes
target_project_idYes
Behavior4/5

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

Discloses validation of link_original_items_with_role against target project enum, stripping of outgoing links, and dry_run preview. Annotations already indicate non-read-only, but description adds concrete behavioral details.

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?

Concise, front-loaded with core purpose. Additional details are relevant and efficiently stated, though the paragraph could be slightly more structured.

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

Completeness4/5

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

Covers prerequisites, default behavior, key parameter options, and validation. Output schema exists, so missing return info is acceptable. Adequate for a complex tool with 10 parameters.

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 descriptions cover 100% of parameters. Description adds meaning beyond schema by explaining behavior of link_original_items_with_role and remove_outgoing_links, and default destination behavior.

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?

States clearly: 'Copy a document, duplicating its structure, body, and contained work items.' Explicitly distinguishes from create_document/update_document which lose contained items.

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 when-not: 'Rebuilding via create_document/update_document loses the contained items.' Also advises checking list_documents first for name availability.

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