Skip to main content
Glama
phillipboesger

Polarion MCP Server

postPageAttachments

Upload multiple files as attachments to a Polarion Rich Page in one request, providing file names and base64 content, and returns the created attachment IDs.

Instructions

Uploads one or more new files as attachments of a Rich Page in a single multipart request: requestBody.resource.data holds one metadata entry (fileName, optional title) per file, and requestBody.files holds the base64-encoded file bytes in the same order (or match them via each entry's lid). Returns the created attachment IDs. Use this to add files; to change an existing attachment use patchPageAttachment, and to list what is already attached use getPageAttachments. Effect: creates a new resource on each call — calling it again with the same input creates a duplicate; it is not idempotent. Tip: set dry_run: true first to preview the exact request Polarion would receive, without changing anything. On tools with a typed output schema, this preview is returned as an error-flagged result since it is not real tool output -- read the text content regardless of that flag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoIf true, validates the request and returns the exact request that would be sent to Polarion — with the Authorization header redacted and any binary payload summarized by byte length — without actually sending it.
spaceIdYesThe Document Space ID (a folder-like grouping of documents/pages within a project). Use `_default` (no quotes) to address the project's default space.
pageNameYesThe Rich Page's ID/name within its space — its stable identifier, not its display title.
projectIdYesThe Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project; call getProjects to list valid IDs.
requestBodyYesAttachment metadata and file data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • changedInput schema / properties / dry_run / description
      Previous value: -"If true, validate and return the request that would be sent without calling Polarion."New value: +"If true, validates the request and returns the exact request that would be sent to Polarion — with the Authorization header redacted and any binary payload summarized by byte length — without actually sending it."
    • addedInput schema / properties / pageName / description
      Added value: +"The Rich Page's ID/name within its space — its stable identifier, not its display title."
    • addedInput schema / properties / projectId / description
      Added value: +"The Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project; call getProjects to list valid IDs."
    • addedInput schema / properties / spaceId / description
      Added value: +"The Document Space ID (a folder-like grouping of documents/pages within a project). Use `_default` (no quotes) to address the project's default space."
  2. Changed1 schema field changedv1.1.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "items": {
      +        "properties": {
      +          "id": {
      +            "example": "MyProjectId/MySpaceId/MyRichPageId/MyAttachmentId",
      +            "type": "string"
      +          },
      +          "links": {
      +            "properties": {
      +              "content": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId/content?revision=1234",
      +                "type": "string"
      +              },
      +              "self": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/spaces/MySpaceId/pages/MyRichPageId/attachments/MyAttachmentId?revision=1234",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "enum": [
      +              "page_attachments"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "If true, validate and return the request that would be sent without calling Polarion.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / requestBody / description
      Previous value: -"Attachment meta data and file data."New value: +"Attachment metadata and file data."
  4. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare idempotentHint=false, and the description elaborates with a concrete consequence: 'calling it again with the same input creates a duplicate; it is not idempotent.' It also discloses the subtle dry_run behavior where the preview is returned as an error-flagged result on typed-output-schema tools. These add meaningful behavioral context beyond what annotations provide, and nothing contradicts the annotations.

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?

The description is dense but well-ordered: purpose first, then request structure, then routing, then behavioral warnings, then the dry_run tip. Every sentence carries unique information. It runs slightly long, particularly the dry_run error-flag explanation, but that nuance earns its place for a complex multipart tool.

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?

For a complex multipart upload with an opaque requestBody string, the description covers invocation structure, file-metadata matching, return values (created attachment IDs), non-idempotence, the dry_run workflow, and sibling routing. The output schema covers return structure. The only residual gap is that the exact serialization format of the requestBody string is left implicit rather than explicitly specified.

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 coverage is 100%, so the baseline is 3. The description adds genuine semantic value by explaining the relationship between requestBody.resource.data (metadata entries) and requestBody.files (base64 bytes), including the ordering rule and the lid-based matching alternative. This meaningfully compensates for the schema's terse 'Attachment metadata and file data' description of requestBody.

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 opening sentence 'Uploads one or more new files as attachments of a Rich Page in a single multipart request' states a specific verb, resource, and transport format. It further distinguishes itself from sibling tools by naming patchPageAttachment for changing attachments and getPageAttachments for listing them, making selection unambiguous among the many attachment-related 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?

The description gives explicit routing guidance: 'Use this to add files; to change an existing attachment use patchPageAttachment, and to list what is already attached use getPageAttachments.' It also adds a concrete usage tip to run dry_run first for validation. This leaves no ambiguity about when to invoke this tool versus its alternatives.

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

Deploy Server

Other Tools