Skip to main content
Glama

delete_attachment

Destructive

Permanently delete a single Jira attachment by its numeric ID; irreversible, one call per attachment, with existence pre-check before removal.

Instructions

Permanently delete one attachment by its numeric id (DELETE /attachments/{id}). Irreversible, and there is no bulk form — one call per attachment. Ids come from list_attachments or from an upload_attachment response; the entity the attachment belongs to is not needed (ids are global, not per-entity). The DELETE itself answers 2xx even for an id that never existed or was already deleted, so the id is verified FIRST with GET /rest/tests/1.0/attachment/{id} (the one endpoint that 404s for a missing attachment): an unknown id fails without deleting anything, at the cost of downloading the attachment's FULL content first — deleting a large attachment transfers the whole file before removing it. Returns { deleted: true, id, existenceVerified: true }, or existenceVerified: false plus a note when that pre-check itself could not answer (the delete is still attempted, so success then does not prove the id existed).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attachmentIdYesNumeric attachment id, as returned by list_attachments or by an upload_attachment response

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.5

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, yet the description goes far beyond: irreversibility, no bulk form, the fact that DELETE returns 2xx for nonexistent ids, the GET pre-check that 404s for missing ids, the side effect of downloading the full attachment content before deletion, and the exact response shape including the existenceVerified:false caveat. This is unusually rich disclosure of non-obvious behavior.

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 core action and irreversibility, then progressively less critical caveats. It is long and dense, but each sentence carries distinct behavioral information rather than filler; the trailing return-shape sentence is the only part that could be trimmed.

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?

No output schema exists, and the description compensates fully by describing the return object and the edge case where existenceVerified is false. For a destructive single-parameter tool, an agent has everything needed to call it and interpret the result.

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% and the schema already documents attachmentId, so the baseline is 3. The description adds real meaning beyond the schema: that ids are global rather than per-entity, that they come from list_attachments/upload_attachment responses, and that the pre-check makes the id's validity consequential.

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 ('Permanently delete one attachment'), the underlying endpoint (DELETE /attachments/{id}), and the scope constraint (one call per attachment, no bulk form). An agent can distinguish it from list_attachments/upload_attachment and from bulk siblings immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains where valid ids originate (list_attachments or upload_attachment response) and that the parent entity is not needed because ids are global. It stops short of naming a sibling tool as the alternative to use in a specific situation, but the operational context for when this tool applies is clear.

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