Skip to main content
Glama
phillipboesger

Polarion MCP Server

postTestRecordAttachments

Add multiple file attachments to a Polarion Test Record using a single request with metadata and base64 file data. Verify via dry-run before actual upload.

Instructions

Uploads one or more new files as attachments of a Test Record 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 patchTestRecordAttachment, and to list what is already attached use getTestRecordAttachments. 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.
iterationYesThe iteration number identifying which repeated occurrence of this item is being addressed (e.g. which run of a test parameter).
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.
testCaseIdYesThe Test Case's ID being referenced.
requestBodyYesAttachment metadata and file data.
testCaseProjectIdYesThe project ID that owns the referenced Test Case — may differ from the project in the request path when the test case is shared from another project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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."
    • changedInput schema / properties / iteration / description
      Previous value: -"The Iteration Number."New value: +"The iteration number identifying which repeated occurrence of this item is being addressed (e.g. which run of a test parameter)."
    • changedInput schema / properties / projectId / description
      Previous value: -"The Project ID."New 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."
    • changedInput schema / properties / testCaseId / description
      Previous value: -"The Testcase ID."New value: +"The Test Case's ID being referenced."
    • changedInput schema / properties / testCaseProjectId / description
      Previous value: -"The Testcase Project ID."New value: +"The project ID that owns the referenced Test Case — may differ from the project in the request path when the test case is shared from another project."
    • changedInput schema / properties / testRunId / description
      Previous value: -"The Test Run ID."New 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/MyProjectId/MyTestcaseId/0/MyAttachmentId",
      +            "type": "string"
      +          },
      +          "links": {
      +            "properties": {
      +              "content": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId/content",
      +                "type": "string"
      +              },
      +              "self": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/attachments/MyAttachmentId",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "enum": [
      +              "testrecord_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.5/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false and idempotentHint=false, so the description's core mutation/non-idempotency traits are not net-new; however, it adds concrete behavioral depth by stating 'calling it again with the same input creates a duplicate.' The dry_run disclosure — that the preview is returned as an error-flagged result on typed-output tools and the agent must 'read the text content regardless of that flag' — is genuinely beyond what annotations can express and is critical for correct handling. No contradiction with 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 longer than average at five sentences, but each sentence earns its place: core action, request structure, sibling routing, idempotency warning, and the dry_run error-flag caveat. The most load-bearing information (what it does, the multipart structure) is front-loaded, with the nuanced dry_run behavior saved for last.

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 high-complexity tool with 7 parameters, 6 required, and an opaque string-typed requestBody, the description covers the difficult parts: the multipart structure, duplicate-creation behavior, and the dry_run preview quirk. The output schema exists, so return values need not be detailed, though the 'Returns the created attachment IDs' line is a helpful confirmation. Minor gaps remain (base64 encoding specifics, size limits), but nothing that would mislead a correct invocation.

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%, establishing a baseline of 3, and the description adds substantial meaning where the schema is thin: requestBody is only described as 'Attachment metadata and file data' in the schema, while the description details its internal structure (requestBody.resource.data entries with fileName/optional title, requestBody.files holding base64 bytes in matching order or via lid). This is exactly the kind of semantic enrichment an agent needs to construct the request correctly.

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 opens with a specific verb and resource: 'Uploads one or more new files as attachments of a Test Record in a single multipart request.' This immediately distinguishes it from sibling attachment tools like postTestRunAttachments and postDocumentItemAttachments by naming the exact target resource (Test Record). It also names the siblings it is not — patchTestRecordAttachment and getTestRecordAttachments — so an agent can disambiguate without inspecting schemas.

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?

Explicit routing is provided: 'Use this to add files; to change an existing attachment use patchTestRecordAttachment, and to list what is already attached use getTestRecordAttachments.' This tells the agent both when to invoke the tool and which alternatives to select instead, with nothing left to inference. The dry_run tip also gives a concrete recommended usage pattern.

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