Skip to main content
Glama

Delete Attachment

confluence_delete_attachment
DestructiveIdempotent

Permanently delete a Confluence attachment and all its versions to remove outdated, duplicate, or sensitive files. Verify the attachment ID before use because deletion cannot be undone.

Instructions

Permanently delete an attachment from Confluence.

Warning: This action cannot be undone! The attachment and ALL its versions will be permanently deleted.

Use this tool to:

  • Remove outdated or incorrect attachments

  • Clean up duplicate files

  • Delete sensitive information that was accidentally uploaded

Best practices:

  • Verify the attachment ID before deletion using get_attachments

  • Consider downloading the attachment first as a backup

  • Check with content owners before deleting shared attachments

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "attachment_id": "<attachment_id>"
    },
    "name": "confluence_delete_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
attachment_idYesThe ID of the attachment to delete. Attachment IDs can be found using the get_attachments tool. Example: 'att123456789'. **Warning**: This permanently deletes the attachment and all its versions.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.0
    • addedInput schema / properties / attachment_id / pattern
      Added value: +"^(att)?\\d+$"
  2. Changed2 schema fields changedv1.4.1
    • addedInput schema / additionalProperties
      Added value: +false
    • removedOutput schema / description
      Removed value: -"Generic wrapper for non-object return types."
  3. Addedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is known; the description nonetheless earns credit for the detail that ALL versions are destroyed, which the annotations do not convey. It stops short of stating permission requirements or behavior for a missing/already-deleted attachment ID, so it is strong but not complete for an open-world destructive tool.

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 warning is front-loaded before the use cases, which is the right ordering for a destructive tool, and the bullet lists are scannable. There is minor redundancy: the irreversibility warning appears in the description, the bolded warning, and again in the schema parameter text.

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?

With an output schema present, annotations covering the destructive profile, and a single required parameter, the description covers nearly everything an agent needs. The remaining gap is operational context such as required Confluence permissions or the outcome when the attachment ID is invalid, which matters given openWorldHint=true and the presence of a permission-checking sibling.

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 coverage is 100% and the single attachment_id parameter is already fully documented in the schema, including the format example and the deletion warning. The description adds only the procedural hint to verify the ID with get_attachments, which the schema repeats, so this is the baseline-3 case of the schema doing the heavy lifting.

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, 'Permanently delete an attachment from Confluence,' and the irreversibility framing immediately distinguishes it from sibling read tools like confluence_get_attachments and from the non-destructive confluence_download_attachment. An agent can identify the target resource and scope without opening the schema.

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 enumerates concrete use cases (outdated, duplicate, or sensitive attachments) and pairs them with prerequisites: verify the ID via get_attachments, download a backup first, and consult content owners for shared attachments. The reference to downloading as a backup implicitly routes the agent to confluence_download_attachment as an alternative when deletion is not warranted.

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