Skip to main content
Glama

create_document_comments

Create one or more comments on a Polarion document in a single HTTP request. Supports top-level comments, replies, plain text or HTML, and optional resolved state and author.

Instructions

Create one or more comments on a Polarion document in a single request.

All comments in comments are sent in a single POST to /projects/{p}/spaces/{s}/documents/{d}/comments. Polarion returns a 201 with the IDs of all created comments.

Thread model: a comment with parent_comment_id=None is a top-level review comment. To reply to an existing comment, set parent_comment_id to the short ID returned in list_document_comments (e.g. 'c42'); the tool composes the full four-segment path proj/space/doc/c42 that the Polarion API requires.

Text format: 'text/plain' (default) stores the body verbatim. Use 'text/html' for HTML-formatted bodies — the HTML is sent as-is, no sanitization.

resolved: omitting the field (None) lets Polarion default to False; pass True to create a pre-resolved comment.

author_id: omit to have Polarion use the authenticated token's user.

This operation is NOT idempotent — retrying with the same input creates duplicate comments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesPolarion project ID.
space_idYesSpace ID (use '_default' for the default space).
document_nameYesDocument name within ``space_id``.
commentsYesOne or more comments to create in a single request.
dry_runNoWhen True, return payload preview without calling Polarion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
createdYesTrue on a real create; False on dry-run.
dry_runYesWhether this was a dry-run.
comment_idsYesShort IDs in Polarion's return order; empty on dry-run.
payload_previewYesJSON:API payload sent or previewed; None after real ops.
Behavior5/5

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

The description discloses important behavioral traits beyond annotations: non-idempotency, the full path composition for parent_comment_id, default handling of resolved and author_id, and the dry_run behavior. This adds significant value as annotations only flag destructive and idempotent hints as false.

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 well-structured with clear sections using **bold** headers. It is concise yet comprehensive—every sentence adds value, and there is no unnecessary repetition.

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 (5 parameters, nested objects, output schema), the description covers all relevant aspects: how to create top-level vs reply comments, text format handling, resolved and author field defaults, and idempotency. It integrates well with sibling tools and provides a complete usage picture.

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?

The description adds substantial meaning beyond the input schema, especially for the 'comments' array items. It explains the parent_comment_id path composition, text format behavior, default values for resolved and author_id, and the dry_run parameter effect. Schema coverage is 100%, but the 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?

The description starts with 'Create one or more comments on a Polarion document in a single request', clearly stating the verb ('create') and resource ('document comments'). It distinguishes from siblings like list_document_comments and update_document_comment by focusing on creation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for using the tool, including the thread model for top-level vs reply comments, text format options, and the non-idempotent nature. However, it does not explicitly state when to use this tool over alternatives like update_document_comment, which is a minor gap.

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