Skip to main content
Glama
phillipboesger

Polarion MCP Server

patchWorkItemAttachment

Idempotent

Rename or replace a work item attachment's title or file content without altering its ID. Use to update existing attachments in Polarion.

Instructions

Updates one existing Work Item attachment: its metadata (e.g. title) via requestBody.resource, and optionally replaces the stored file by passing base64-encoded bytes in requestBody.content. The attachment keeps its ID. Use this to rename or re-upload a file that already exists; to add a new file use postWorkItemAttachments, and to read the current file use getWorkItemAttachmentContent. Effect: idempotent — calling it again with the same input leaves the resource in the same end state, with no additional side effects. 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.
workItemIdYesThe Work Item's ID within its project (e.g. `WI-123`), not the combined `project/id` path used in some link payloads.
requestBodyNoAttachment metadata and file data.
attachmentIdYesThe attachment's ID, as returned by the corresponding list- or get-attachments call for this resource.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • addedInput schema / properties / attachmentId / description
      Added value: +"The attachment's ID, as returned by the corresponding list- or get-attachments call for this resource."
    • 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 / workItemId / description
      Added value: +"The Work Item's ID within its project (e.g. `WI-123`), not the combined `project/id` path used in some link payloads."
  2. 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."
  3. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description explains the idempotent effect in plain terms ('leaves the resource in the same end state, with no additional side effects') and documents the dry_run preview behavior, including the unusual error-flagged result. This gives the agent actionable behavioral knowledge not present in 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: core operation, usage guidance, side-effect note, and dry-run tip each earn their place. There is no redundant repetition of schema or annotation data.

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?

Despite having no output schema, the description covers what the tool does, when to use it, its side-effect profile, and the dry-run workflow. Combined with the fully-covered parameter schema and annotations, an agent has everything needed to invoke it correctly.

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%, setting a baseline of 3. The description adds real value by revealing the internal structure of requestBody (resource vs. content) and confirming that base64-encoded bytes are expected for file replacement, which the generic schema description does not convey.

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: 'Updates one existing Work Item attachment'. It also clarifies the exact scope (metadata via requestBody.resource, optional file replacement via requestBody.content) and differentiates from siblings by explicitly naming postWorkItemAttachments for adding and getWorkItemAttachmentContent for reading.

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?

It explicitly states when to use this tool ('rename or re-upload a file that already exists') and directs the agent to specific alternatives for adding a new file and reading the current file. No ambiguity remains about the selection criteria.

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