Skip to main content
Glama
phillipboesger

Polarion MCP Server

postTestRunAttachments

Upload one or more files as attachments to a specific Polarion Test Run using a single multipart request, with optional metadata for each file. Use this to add new attachments; existing ones can be modified or listed with other tools.

Instructions

Uploads one or more new files as attachments of a Test Run 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 patchTestRunAttachment, and to list what is already attached use getTestRunAttachments. 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.
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.
testRunIdYesThe Test Run's ID within its project.
requestBodyYesAttachment metadata and file data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 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 / 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 / testRunId / description
      Added value: +"The Test Run's ID within its project."
  2. Changed1 schema field changedv1.1.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "items": {
      +        "properties": {
      +          "id": {
      +            "example": "MyProjectId/MyTestRunId/MyAttachmentId",
      +            "type": "string"
      +          },
      +          "links": {
      +            "properties": {
      +              "content": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId/content?revision=1234",
      +                "type": "string"
      +              },
      +              "self": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/attachments/MyAttachmentId?revision=1234",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "enum": [
      +              "testrun_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

A5/5.0
Behavior5/5

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

Goes beyond annotations by spelling out the exact non-idempotency consequence: 'calling it again with the same input creates a duplicate.' It also discloses the dry_run preview behavior and warns that the preview is returned as an error-flagged result, which is critical context an agent would not otherwise know.

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 first sentence delivers the core purpose, and each following sentence adds a distinct piece of value: request structure, return value, sibling routing, idempotency warning, and dry_run tip. The length is justified by the multipart complexity, and nothing is redundant.

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 output schema and annotations are present, the description covers all behavior an agent needs to invoke correctly: what it creates, how to structure the payload, how to preview safely, what the duplicate risk is, and which sibling tools to use for other operations.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds substantial meaning: it explains how requestBody maps to metadata entries and file bytes, how lid is used to match entries, and what dry_run does. It also tells the agent how to obtain a valid projectId via getProjects.

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 a specific verb and resource: 'Uploads one or more new files as attachments of a Test Run in a single multipart request.' It also names the return value ('Returns the created attachment IDs') and distinguishes itself from siblings by explicitly naming patchTestRunAttachment and getTestRunAttachments.

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?

Gives explicit routing guidance: 'Use this to add files; to change an existing attachment use patchTestRunAttachment, and to list what is already attached use getTestRunAttachments.' It also recommends dry_run for safe preview, which helps agents decide how to invoke it safely.

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