Skip to main content
Glama

overwriteDocumentParts

Destructive

Replaces a LiveDoc's parts with a supplied part list to update document content; validate with dry_run first because overwritten or removed parts cannot be recovered.

Instructions

Replaces the parts of a LiveDoc with the supplied part list. This can remove or replace existing content, so read the current structure with getDocumentParts and use dry_run before writing. Use moveDocumentParts to reposition existing parts while retaining their identities. Effect: irreversible — data removed or overwritten by this call cannot be recovered through the API. 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.
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. If the ID is unknown, ask the user; getProjects lists IDs only with global read access.
requestBodyYesParameters for overwriting multiple Work Item Document Parts.
documentNameYesThe Document name.

Output Schema

NameRequiredDescriptionDefault
dataNo

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. Changed7 schema fields changedv1.3.1
    • removedOutput schema / properties / data / properties / overwrittenParts / items / properties / newPartId / example
      Removed value: -"MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId"
    • changedOutput schema / properties / data / properties / overwrittenParts / items / properties / newPartId / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / overwrittenParts / items / properties / oldPartId / example
      Removed value: -"MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId"
    • changedOutput schema / properties / data / properties / overwrittenParts / items / properties / oldPartId / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / overwrittenParts / items / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / overwrittenParts / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / data / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  3. Changed3 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 / 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."
  4. Changed1 schema field changedv1.1.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "properties": {
      +        "overwrittenParts": {
      +          "description": "Array of Part ID mappings showing old and new IDs.",
      +          "items": {
      +            "properties": {
      +              "newPartId": {
      +                "description": "New Part ID after overwrite operation.",
      +                "example": "MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId",
      +                "type": "string"
      +              },
      +              "oldPartId": {
      +                "description": "Original Part ID before overwrite operation.",
      +                "example": "MyProjectId/MySpaceId/MyDocumentId/workitem_MyWorkItemId",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructive annotation, the description clearly states that removed or overwritten data is irreversible and cannot be recovered through the API. It also explains the `dry_run` preview behavior, including that it validates arguments and avoids sending the request to Polarion.

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 front-loaded with the operation and the destructive consequence, then provides the relevant prerequisites, alternative, and `dry_run` guidance. Every sentence contributes to safe invocation or correct tool selection.

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 destructive mutation with nested parameters and an output schema, the description covers the key risks, required preparatory reads, alternative tool, and safe preview path. Nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters, including `dry_run`, `spaceId`, `projectId`, `requestBody.partIds`, and `documentName`. The description reinforces the `dry_run` workflow but does not add substantial meaning beyond the schema's parameter descriptions.

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 states a specific verb and resource: replacing the parts of a LiveDoc with a supplied part list. It explicitly distinguishes this operation from `moveDocumentParts`, which repositions existing parts while retaining their identities.

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 tells the agent to read the current structure with `getDocumentParts` and to use `dry_run` before writing. It also names the alternative `moveDocumentParts` for repositioning parts without replacing them, making the when-to-use choice explicit.

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