Skip to main content
Glama
fbossiere

Proton Safe MCP

by fbossiere

Begin attachment upload

begin_attachment_upload

Starts staging an attachment upload by validating filename, MIME type, size, and SHA-256 checksum; returns upload parameters and expires if abandoned, so no bytes reach a draft until later steps.

Instructions

Start staging one outgoing attachment. This is step 1 of 3: begin_attachment_upload, then upload_attachment_chunk for every chunk in order, then finish_attachment_upload, which returns the token create_confirmed_draft accepts. Call it only for a file the user asked to attach, with bytes the client already holds: it takes a filename, never a local path, and never reads the filesystem. It returns upload_id, the max_chunk_bytes to size chunks by, and expires_at; nothing reaches a draft until the step 3 token is used, and an abandoned upload expires on its own. Allowed types are PDF, DOCX, XLSX, PPTX, TXT, CSV, PNG, and JPEG: any other extension, a content_type that contradicts it, or an oversized declaration is refused here, before a single byte is sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesBase name the recipient will see, such as report.pdf, never a path: a value containing a directory separator is refused. Its extension selects the allowed type and must agree with content_type.
sha256_hexYesSHA-256 of the complete decoded file as 64 hexadecimal characters, in either case. It is re-computed at step 3 and again when the draft is created, so staged bytes that changed in between are refused instead of being attached.
size_bytesYesExact total byte length of the decoded file, declared up front so the staged size is verified at step 3. A chunk that would exceed it is refused, and a final total that differs fails the upload.
content_typeYesMIME type of the bytes, which must be the canonical type for the filename extension, or application/octet-stream to let the extension decide. A type that contradicts the extension is refused.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.3.0
    • addedInput schema / properties / content_type / description
      Added value: +"MIME type of the bytes, which must be the canonical type for the filename extension, or application/octet-stream to let the extension decide. A type that contradicts the extension is refused."
    • addedInput schema / properties / filename / description
      Added value: +"Base name the recipient will see, such as report.pdf, never a path: a value containing a directory separator is refused. Its extension selects the allowed type and must agree with content_type."
    • addedInput schema / properties / sha256_hex / description
      Added value: +"SHA-256 of the complete decoded file as 64 hexadecimal characters, in either case. It is re-computed at step 3 and again when the draft is created, so staged bytes that changed in between are refused instead of being attached."
    • addedInput schema / properties / size_bytes / description
      Added value: +"Exact total byte length of the decoded file, declared up front so the staged size is verified at step 3. A chunk that would exceed it is refused, and a final total that differs fails the upload."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, idempotentHint=false, destructiveHint=false, which is thin. The description compensates fully: it discloses that nothing reaches a draft until the step 3 token is used, that abandoned uploads expire on their own, that validation happens before any bytes are sent, and that the tool returns upload_id, max_chunk_bytes, and expires_at. This is rich behavioral context beyond the annotations.

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 description is dense but every sentence earns its place: protocol position, usage condition, return values, safety guarantees, and allowed types. It is front-loaded with the most important fact (step 1 of 3). Slightly long, but the density is justified given the multi-step protocol and validation rules.

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?

For a 4-param tool with 100% schema coverage, an output schema, and a multi-step protocol, the description covers everything an agent needs: when to call, what to pass, what comes back, what is refused, and what happens next. The output schema presumably documents the return shape, so the description needn't repeat it. No gaps.

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 description coverage is 100%, so the baseline is 3. The description adds value by explaining the cross-parameter contract: filename extension selects the allowed type and must agree with content_type, size_bytes is verified at step 3, and sha256_hex is re-computed later. It doesn't enumerate each parameter, but it explains the semantics that bind them together, which the schema doesn't fully convey.

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 states a specific verb ('Start staging'), a specific resource ('one outgoing attachment'), and explicitly positions it as step 1 of a 3-step protocol, naming the sibling steps. It clearly distinguishes this tool from upload_attachment_chunk, finish_attachment_upload, and create_confirmed_draft.

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?

The description gives explicit when-to-use guidance: 'Call it only for a file the user asked to attach, with bytes the client already holds.' It also states exclusions ('never a local path, and never reads the filesystem') and names the exact sequence of sibling tools to use instead. This is exemplary usage guidance.

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