Skip to main content
Glama

create_document_comments

Add multiple comments to a Polarion document in one request, including threaded replies and HTML formatting, for efficient documentation feedback.

Instructions

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

Reply: set parent_comment_id to a short id from list_document_comments (None = top-level). 'text/html' text is sent unsanitized. Always authored by the token's user. NOT idempotent — a retry duplicates. attachment:{id} image refs in text/html comments must name an existing document attachment — resolve via list_document_attachments first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview payload without writing; guards still query Polarion.
commentsYesComments to create in one request.
space_idYesSpace ID ('_default' = default space).
project_idYesPolarion project ID.
document_nameYesDocument name within space_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
createdYes
dry_runYes
comment_idsYes
payload_previewYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0
  2. Removedv2.0.0
  3. Changed5 schema fields changedv2.0.0
    • changedInput schema / properties / comments / items / description
      Previous value: -"Common fields for a comment to create; base for type-specific specs."New value: +"Common create fields; base for type-specific specs."
    • removedInput schema / properties / comments / items / properties / author_id
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • changedInput schema / properties / document_name / description
      Previous value: -"Document name within ``space_id``."New value: +"Document name within space_id."
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview payload without calling Polarion."New value: +"Preview payload without writing; guards still query Polarion."
    • changedOutput schema / description
      Previous value: -"Result of a comment-create operation."New value: +"Comment-create result."
  4. Changed1 schema field changedv1.4.1
    • addedInput schema / properties / comments / items / additionalProperties
      Added value: +false
  5. Changed5 schema fields changedv1.4.0
    • changedInput schema / properties / comments / description
      Previous value: -"One or more comments to create in a single request."New value: +"Comments to create in one request."
    • changedInput schema / properties / comments / items / description
      Previous value: -"One comment to create via ``create_document_comments``."New value: +"Common fields for a comment to create; base for type-specific specs."
    • changedInput schema / properties / dry_run / description
      Previous value: -"When True, return payload preview without calling Polarion."New value: +"Preview payload without calling Polarion."
    • changedInput schema / properties / space_id / description
      Previous value: -"Space ID (use '_default' for the default space)."New value: +"Space ID ('_default' = default space)."
    • changedOutput schema / description
      Previous value: -"Result of a ``create_document_comments`` operation."New value: +"Result of a comment-create operation."
  6. Changed12 schema fields changedv1.1.0
    • changedInput schema / properties / comments / items / description
      Previous value: -"One comment to create via ``create_document_comments``.\n\n``parent_comment_id`` is the short ID from ``list_document_comments``\n(omit for top-level); the tool composes the full path internally.\nOmit ``author_id`` to default to the authenticated token's user;\nomit ``resolved`` to let Polarion default to False."New value: +"One comment to create via ``create_document_comments``."
    • removedInput schema / properties / comments / items / properties / author_id / description
      Removed value: -"Author user ID."
    • removedInput schema / properties / comments / items / properties / parent_comment_id / description
      Removed value: -"Short comment ID for replies; omit for top-level."
    • removedInput schema / properties / comments / items / properties / resolved / description
      Removed value: -"Initial resolved state."
    • removedInput schema / properties / comments / items / properties / text / description
      Removed value: -"Comment body text."
    • removedInput schema / properties / comments / items / properties / text_format / description
      Removed value: -"MIME type of ``text``."
    • removedOutput schema / $defs
      Removed value: -{
      -  "JsonValue": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "integer"
      -      },
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "boolean"
      -      },
      -      {
      -        "items": {
      -          "$ref": "#/$defs/JsonValue"
      -        },
      -        "type": "array"
      -      },
      -      {
      -        "additionalProperties": {
      -          "$ref": "#/$defs/JsonValue"
      -        },
      -        "type": "object"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  }
      -}
    • removedOutput schema / properties / comment_ids / description
      Removed value: -"Short IDs in Polarion's return order; empty on dry-run."
    • removedOutput schema / properties / created / description
      Removed value: -"True on a real create; False on dry-run."
    • removedOutput schema / properties / dry_run / description
      Removed value: -"Whether this was a dry-run."
    • changedOutput schema / properties / payload_preview / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {
      -      "$ref": "#/$defs/JsonValue"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / payload_preview / description
      Removed value: -"JSON:API payload sent or previewed; None after real ops."
  7. First observedv0.9.0

TDQS

A4.7/5.0
Behavior5/5

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

With annotations already indicating write, non-idempotent, and open-world behavior, the description adds valuable context: comments are authored by the token's user, 'text/html' is sent unsanitized, retries duplicate comments, and attachment references must name existing document attachments. This goes well beyond the structured annotations.

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 compact and front-loaded with the primary purpose. Every line adds operational value—batching, parent IDs, sanitization, idempotency, and attachment resolution—without redundancy or padding.

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 (batch create, formatting options, attachments) and the presence of an output schema, the description covers all critical behavioral and prerequisite information. It leaves no major gaps for an agent to misuse the tool, from idempotency to authentication to attachment handling.

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?

The input schema covers all parameters with descriptions, providing a high baseline. The description enriches this by explaining parent_comment_id should come from list_document_comments and that 'text/html' text is unsanitized, which directly informs parameter usage. It does not fully explain dry_run, but schema coverage already handles that adequately.

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 begins with a specific verb+resource: 'Create one or more comments on a document in one request.' This clearly distinguishes it from siblings like create_work_item_comments and update_document_comment, and the batch aspect ('in one request') adds further specificity.

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 on how to use the tool, such as setting parent_comment_id from list_document_comments and resolving attachments via list_document_attachments first. It does not explicitly state when not to use this tool versus alternatives, but the resource-specific title and first sentence make the usage domain evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.