Skip to main content
Glama
phillipboesger

Polarion MCP Server

patchDocumentAttachment

Idempotent

Update an existing document attachment's metadata or replace its file by sending base64-encoded content, keeping the same attachment ID. Use to rename or re-upload a file without creating a duplicate.

Instructions

Updates one existing Document 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 postDocumentItemAttachments, and to read the current file use getDocumentAttachmentContent. 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.
spaceIdYesThe Document Space ID (a folder-like grouping of documents/pages within a project). Use `_default` (no quotes) to address the project's default space.
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.
requestBodyNoAttachment metadata and file data.
attachmentIdYesThe attachment's ID, as returned by the corresponding list- or get-attachments call for this resource.
documentNameYesThe Document name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • changedInput schema / properties / attachmentId / description
      Previous value: -"The Attachment ID."New 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."
    • 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 / spaceId / description
      Previous value: -"The Space ID. (Use '_default' without quotes to address the default Space.)"New value: +"The Document Space ID (a folder-like grouping of documents/pages within a project). Use `_default` (no quotes) to address the project's default space."
  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.7/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint=false, idempotentHint=true), the description elaborates the idempotent effect: 'calling it again with the same input leaves the resource in the same end state, with no additional side effects'. It also discloses the dry_run preview behavior, including the error-flagged result caveat, and notes that the attachment keeps its ID. This meaningfully extends what annotations alone would tell an agent.

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 front-loaded with the core action and resource, then alternatives, then effect, then dry_run tip. All sentences contribute unique information, but the dry_run paragraph is slightly verbose and includes a generic note about typed output schemas that does not apply to this tool (since output schema is false). It remains focused and efficient overall.

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 PATCH operation with no output schema, the description covers purpose, alternatives, effects, and parameter semantics comprehensively. It lacks explicit mention of return values on success and does not state that requestBody is optional per schema (required fields exclude it), but given the tool's complexity and available annotations, an agent can invoke it correctly. The dry_run note partially substitutes for output expectations.

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%, giving baseline 3, but the description adds crucial semantics for requestBody: it clarifies the internal structure (requestBody.resource for metadata, requestBody.content for base64 bytes). It also defines dry_run's behavior. However, requestBody remains typed as a string in the schema, and the description implies an object structure, which could confuse but is a schema issue rather than a description deficiency.

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 verb 'Updates' and the resource 'one existing Document attachment', specifying what changes (metadata via requestBody.resource and optional file replacement via requestBody.content). It explicitly differentiates from siblings by naming postDocumentItemAttachments for adding new files and getDocumentAttachmentContent for reading, so an agent can select the correct tool unequivocally.

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?

The description provides explicit when-to-use guidance: 'Use this to rename or re-upload a file that already exists'. It also names the exact alternatives for add (postDocumentItemAttachments) and read (getDocumentAttachmentContent), leaving no ambiguity. The dry_run tip adds practical invocation guidance without confusing the decision context.

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