Skip to main content
Glama
phillipboesger

Polarion MCP Server

postTestStepResultAttachments

Upload files as attachments to a test step result in Polarion. Specify metadata and base64 file data in a single request to create the attachments.

Instructions

Uploads one or more new files as attachments of a Test Step Result 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 patchTestStepResultAttachment, and to list what is already attached use getTestStepResultAttachments. 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.
testStepIndexYesThe Test Step index.
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/1/MyAttachmentId",
      +            "type": "string"
      +          },
      +          "links": {
      +            "properties": {
      +              "content": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId/content",
      +                "type": "string"
      +              },
      +              "self": {
      +                "example": "server-host-name/application-path/projects/MyProjectId/testruns/MyTestRunId/testrecords/MyProjectId/MyTestcaseId/0/teststepresults/1/attachments/MyAttachmentId",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": {
      +            "enum": [
      +              "teststepresult_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.8/5.0
Behavior5/5

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

Annotations already include idempotentHint=false and destructiveHint=false, but the description adds significant context: it explains that repeated calls with the same input create duplicates, describes the dry_run preview behavior (including the error-flagged result nuance for typed output schemas), and clarifies that new resources are created. This goes well beyond the annotations and fully discloses behavioral traits.

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 somewhat long but each sentence serves a purpose: it front-loads the core action, then provides usage guidance, then behavioral details and a tip. The structure is logical, but the multipart explanation and dry_run tip are packed densely, making it slightly heavy while still efficient.

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?

For a complex tool with 8 parameters, the description covers all necessary aspects: how to structure the multipart request, how to match files to metadata, the non-idempotent behavior, the dry_run preview, and the alternative tools. The output schema exists, so return values needn't be detailed, but it even mentions returning created attachment IDs. Nothing essential is missing.

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% per the context, so the baseline is 3. The description adds meaningful semantics by explaining the structure of requestBody (metadata in requestBody.resource.data, files in requestBody.files, ordering, and lid matching) and the purpose of dry_run. This adds value beyond the raw schema definitions, though it could have elaborated more on the exact format of the metadata entry.

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 clearly states the tool uploads new files as attachments of a Test Step Result in a single multipart request, and explicitly distinguishes it from the sibling patch and get tools. The verb 'uploads' and specific resource (Test Step Result attachments) leave no ambiguity about what the tool does.

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?

Explicitly states when to use this tool ('Use this to add files') and names the alternatives for changing (patchTestStepResultAttachment) and listing (getTestStepResultAttachments) attachments. Also provides guidance on dry_run usage and non-idempotency, giving clear direction for appropriate invocation.

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