Skip to main content
Glama

patchWorkItemAttachment

Idempotent

Update an existing Work Item attachment's metadata and optionally replace its stored file via base64 content while keeping the attachment ID.

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 validate the arguments and preview the exact request without sending it to Polarion. The executor returns this preview as normal text, and as structured content when the tool declares an output schema.

Input 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. If the ID is unknown, ask the user; getProjects lists IDs only with global read access.
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. Changed1 schema field changedv1.4.4
    • changedInput schema / properties / projectId / description
      Previous 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."New value: +"The Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project. If the ID is unknown, ask the user; getProjects lists IDs only with global read access."
  2. 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."
  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 declare idempotentHint=true and destructiveHint=false, and the description restates idempotency rather than adding new safety information. It does add genuine context beyond annotations: the ID is preserved across the update, and dry_run returns a redacted preview instead of sending the request. It stops short of saying whether omitted metadata fields are preserved or cleared.

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?

Front-loaded with the action and its two modes, followed by sibling routing. Slightly padded: the 'Effect: idempotent…no additional side effects' sentence largely duplicates the idempotentHint annotation, and the closing sentence about text vs structured content is more verbose than needed.

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?

No output schema exists, and the description covers the dry_run return shape and the ID-retention outcome, which are the key unknowns for a mutation call. Minor gaps remain around permissions and partial-metadata semantics, but an agent has enough 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%, so baseline is 3, but the description adds real meaning the schema lacks — it explains that requestBody splits into resource (metadata, e.g. title) and content (base64 file bytes), which the schema only calls 'Attachment metadata and file data.' The dry_run tip also clarifies that behavior in context.

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 ('Updates one existing Work Item attachment') and disambiguates the two aspects it can change: metadata via requestBody.resource and file bytes via requestBody.content. It also notes the attachment keeps its ID, which distinguishes this from a delete/re-create flow.

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 routes the agent: '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.' It also gives a recommended precondition (dry_run: true first), which is rare and useful.

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