Skip to main content
Glama

create_document

Creates a new document in a Polarion project space, specifying unique name, title, type, and optional status, custom fields, and Markdown home page content.

Instructions

Create a document in a space.

document_name must be unique in the space — a duplicate name conflicts; check list_documents first. type/status and custom_fields keys are validated on write — resolve ids via list_document_enum_options first.

Set rendering_layout_types to every work item type the document will hold — without a layout their fields do not render in the Polarion UI. Resolve those ids via list_work_item_enum_options; a later update_document must resend every type to keep.

home_page_content is Markdown (greenfield only), converted to sanitized HTML. Markdown tables get native Polarion styling; a paragraph starting 'Table:' directly after a table becomes a numbered caption widget. Post-create edits round-trip raw HTML via get_document(include_home_page_content_html=True) and update_document; add work items via move_work_item_to_document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesDocument type (e.g. 'req_specification', 'generic').
titleYesHuman-readable document title.
statusNoInitial workflow status (project default if omitted).
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_fieldsNoKeyed by Polarion field ID (copy keys from a sibling document); rich-text values as {'type':'text/html','value':...}.
document_nameYesDocument name (e.g. 'MySpecV1'); unique within space_id, appears in the document URL.
home_page_contentNoMarkdown body; converted to sanitized HTML.
rendering_layout_typesNoWork item type IDs the document will hold (e.g. ['softwarerequirement']); each gets a section layout.
uses_outline_numberingNoEnable auto outline numbers (1, 1.1, ...).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
createdYes
dry_runYes
document_nameYes
payload_previewYes
Behavior5/5

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

The description discloses important behavioral traits beyond the annotations: duplicate name conflicts, write-time validation, the necessity of rendering layout types for fields to appear, Markdown-to-sanitized-HTML conversion, table caption widget behavior, and round-tripping of raw HTML. This is rich, non-obvious context that annotations (readOnlyHint=false, etc.) do not convey.

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

Conciseness5/5

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

The description is appropriately sized for the tool's complexity. Every sentence adds value, from the core purpose to caveats and workflow guidance. It is front-loaded with the primary action, then logically progresses through prerequisites, layout requirements, and Markdown behavior without redundancy.

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 12-parameter schema with 100% coverage and an output schema, the description covers all necessary context: uniqueness, validation via enum options, layout requirements, Markdown handling, and follow-up operations. It provides a complete picture of how to use the tool correctly and what to expect, without needing to detail return values (covered by output schema).

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?

Even though the schema describes each parameter, the description adds crucial semantic context: document_name uniqueness and the need to check existing documents; type/status/custom_fields validation requiring enum resolution; rendering_layout_types must include every work item type or fields won't render; home_page_content Markdown conversion and caption behavior. This significantly enriches understanding of how parameters interact.

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 'Create a document in a space' with a specific verb and resource. It distinguishes itself from sibling tools like list_documents, update_document, and copy_document by focusing on creation and adding detailed caveats (uniqueness, layout types, Markdown conversion) that are unique to creation.

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 usage guidance: 'check list_documents first' to avoid duplicate names, 'resolve ids via list_document_enum_options first' and 'list_work_item_enum_options' for validation, and references to post-create actions via update_document and move_work_item_to_document. It clearly signals when to use this tool versus 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