Skip to main content
Glama
fbossiere

Proton Safe MCP

by fbossiere

Discard staged attachment

discard_attachment
Destructive

Permanently delete a staged outgoing attachment and invalidate its token. Use it to cancel or replace an uploaded file before creating a draft; the action cannot be undone.

Instructions

Permanently remove one staged outgoing attachment before it is used, destroying its token and the staged bytes. Use it when the user cancels an attachment or replaces a wrong file after finish_attachment_upload. It is not needed after a draft is created, which already consumes the token, and it cannot be undone: a second call with the same token fails, and restaging means starting again at begin_attachment_upload. It touches staged outgoing bytes only and never deletes mail, a draft, or a received attachment. It returns discarded: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attachment_tokenYesThe attachment_token finish_attachment_upload returned, not the upload_id. It is single-use, so a token already spent by create_confirmed_draft or by an earlier discard is refused.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.0
    • addedInput schema / properties / attachment_token / description
      Added value: +"The attachment_token finish_attachment_upload returned, not the upload_id. It is single-use, so a token already spent by create_confirmed_draft or by an earlier discard is refused."
  2. Changed2 schema fields changedv2.0.1
    • addedInput schema / properties / attachment_token / maxLength
      Added value: +200
    • addedInput schema / properties / attachment_token / minLength
      Added value: +1
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Even though destructiveHint already signals danger, the description adds crucial behavioral context: the token and staged bytes are destroyed, the operation is irreversible, a second call with the same token fails, and it never affects mail, drafts, or received attachments. This goes well beyond the annotations and fully discloses the risk profile.

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 dense but every sentence earns its place: it front-loads the destructive action, then gives usage timing, exclusions, non-idempotency, scope, and return value. No filler or repetition of schema details.

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?

With a single required parameter, full schema coverage, an output schema, and annotations, the description still adds the complete lifecycle context (when tokens are consumed, what cannot be undone, staging restart). Nothing an agent needs to decide whether and how to call this tool 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 coverage is 100% and the parameter description already explains that attachment_token is the token returned by finish_attachment_upload, not upload_id, and is single-use. The tool description reinforces this lifecycle context but does not add substantial parameter semantics beyond what the schema already provides, so baseline 3 is appropriate.

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 names a specific verb and resource: 'Permanently remove one staged outgoing attachment before it is used, destroying its token and the staged bytes.' This clearly distinguishes it from sibling tools like finish_attachment_upload and create_confirmed_draft, so an agent can tell exactly what operation is performed.

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 explicitly states when to use the tool ('when the user cancels an attachment or replaces a wrong file after finish_attachment_upload') and when not to ('It is not needed after a draft is created'). It also points to the restart path via begin_attachment_upload, giving the agent clear routing guidance.

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