Skip to main content
Glama
mattias242

protonmail-mcp-server

by mattias242

Skicka utkast

send_draft
Destructive

Sends a reviewed ProtonMail draft from Drafts via SMTP to its To, Cc, and Bcc recipients, then deletes it.

Instructions

Skicka ett utkast ur Drafts exakt som det ligger där, och ta sedan bort det.

Använd först när utkastet är granskat och godkänt. Utkastet hämtas ur Drafts (med eventuella ändringar som gjorts i Proton) och skickas över SMTP till adresserna i To, Cc och Bcc — exakt de som get_email visar för utkastet. Bcc-headern tas bort ur det som skickas, så de hemliga mottagarna syns inte för de andra. Bridge lägger det skickade mejlet i Sent.

Ett utkast vägras (inget skickas) om To, Cc eller Bcc förekommer mer än en gång, eller om en adress inte kan tolkas entydigt (get_email skulle visa andra adresser än de som rubriken innehåller). Skriv då om adresserna med update_draft.

Efter skicket tas utkastet bort ur Drafts. Ett utkast som Bridge visar (med id@protonmail.internalid i References) tar Bridge själv bort när skicket lyckats; finns utkastet då inte längre räknas det som borttaget. Finns det kvar raderas det permanent härifrån. Hitta utkast med list_emails(mailbox="Drafts").

Misslyckas skicket ligger utkastet kvar orört. Vägrar servern bara några mottagare har mejlet ändå gått till de övriga: felet anger vilka, och utkastet ligger kvar — skicka då inte om det till alla.

Args: uid: Utkastets UID i Drafts (från create_draft eller list_emails) mailbox: Alltid "Drafts" — anges för att bekräfta att UID:t kommer därifrån

Returns: {"sent": True, "message_id", "recipients", "draft_deleted"} där recipients är {"to": [...], "cc": [...], "bcc": [...]}: exakt de adresser mejlet skickades till. "note" förklarar när Bridge har tagit bort utkastet i Proton men Drafts ännu inte visar det. Gick utkastet inte att ta bort är draft_deleted False och "warning" förklarar — mejlet HAR då skickats och ska inte skickas igen.

Raises: ValueError: utkastet finns inte i Drafts, saknar mottagare, har en ogiltig adress, dubbla adressrubriker eller en adress som inte kan tolkas entydigt (inget skickas). SMTPPartialDeliveryError: servern vägrade några av mottagarna.

Input Schema

NameRequiredDescriptionDefault
uidYes
mailboxYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent/open-world, but the description goes well beyond them: Bcc header stripping, Bridge placing the mail in Sent, the conditions that cause a refusal with nothing sent, who removes the draft (Bridge vs. this tool), and that a partial delivery still delivered to the accepted recipients.

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?

Long, but front-loaded with the core action and organized into behavior, refusal conditions, deletion semantics, Args, Returns and Raises. The Returns and Raises detail is load-bearing since there is no output schema; a few sentences (e.g. the Bridge internalid aside) are dense but still earn their place.

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 no output schema, the description supplies the return shape (sent, message_id, recipients, draft_deleted, plus note/warning) and the failure modes (ValueError, SMTPPartialDeliveryError) with what each implies for retry. An agent has everything needed to call and interpret it safely.

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?

With 0% schema description coverage the description must carry the parameter meaning, and it does: uid is explained as the Drafts UID sourced from create_draft or list_emails, and mailbox is explained as always "Drafts" for confirmation. Only the exact UID format is left implicit.

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 with its full lifecycle: sends a Drafts draft exactly as it stands and then removes it. This is clearly distinguishable from send_email (composes and sends), create_draft and update_draft (which it references for the address-rewrite path).

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?

Explicitly says to use it only once the draft is reviewed and approved, names update_draft for fixing ambiguous addresses, and points to list_emails(mailbox="Drafts") for finding drafts. It also gives an exclusion: after a partial delivery, do not resend to everyone.

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