Skip to main content
Glama

Delete attachment

delete_attachment
Destructive

Permanently delete an attached file from OpenProject. Requires explicit user confirmation; reads attachment metadata first to accurately identify the file and its container.

Instructions

Permanently delete one attached file from OpenProject.

Use it only on explicit user instruction, for example to remove a file uploaded to the wrong work package or a superseded document. The attachment's metadata is read first so the result names the file and the container it was attached to, and so an unknown id fails before anything is removed.

Returns the attachment id, the file name, its container and a confirmation message.

Pitfalls: this deletes the file itself, not a link to it — every work package, wiki page or comment that embedded it loses the image or download. Deleting needs edit permission on the container (or authorship for a file that has no container yet), so a 403 can follow a successful read. A 404 means the id is unknown or already deleted; a second call on the same id answers 404 rather than succeeding. Removing a file does not remove the comment or work package that referenced it.

Related: list_attachments shows the ids and file names of everything a container holds; upload_attachment adds a replacement; download_attachment saves a copy first if the bytes are still wanted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true. Ask the user to confirm first: OpenProject offers no undo and no trash. Calling with confirm=false returns a confirmation_required error and nothing is read or deleted.
attachment_idYesNumeric attachment id from list_attachments or get_work_package(include=['attachments']). Never a work package or container id — deleting the wrong id cannot be undone.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesId of the attachment that was deleted.
deletedYesTrue once OpenProject accepted the deletion.
messageYesHuman-readable confirmation.
containerNoObject the file was attached to (work package, wiki page, meeting, ...); null for an uploaded file that was never claimed by one.
file_nameNoName of the file that was removed, read before deleting it.
Behavior5/5

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

Annotations already flag destructive=true, but the description goes far beyond by explaining the read-before-delete flow, 403/404 semantics, non-idempotency (second call returns 404), cascading effects on embedded content, and permission requirements. No contradiction with annotations; instead it enriches them.

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?

Structured with clear sections (main action, usage, pitfalls, related). Every sentence provides necessary information for a destructive tool; nothing is redundant or filler.

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?

Comprehensive for a destructive attachment operation: purpose, prerequisites, error behavior, side effects, and alternatives are all covered. The presence of an output schema and 100% schema parameter coverage complements the rich description, making this a complete tool definition.

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?

The input schema already covers both parameters well (100% coverage). The description adds valuable extra context by explaining that attachment_id must come from list_attachments or get_work_package and that an unknown id fails before deletion, supplementing the schema's warning about wrong id types.

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 'Permanently delete one attached file from OpenProject' — a specific verb, resource, and scope. It clearly distinguishes this from sibling attachment operations like list_attachments, upload_attachment, and download_attachment.

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?

Provides explicit guidance: 'Use it only on explicit user instruction' with concrete use cases (remove a mis-uploaded or superseded file). The Related section names list_attachments, upload_attachment, and download_attachment as alternatives, making when-to-use crystal clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kar-thik/openproject-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server