Skip to main content
Glama
fbossiere

Proton Safe MCP

by fbossiere

Finalize attachment upload

finish_attachment_upload

Verify a fully uploaded attachment by checking its size and SHA-256, then return a single-use token for draft confirmation. Detects missing bytes or mismatched hashes, preventing invalid attachments from proceeding.

Instructions

Verify a fully uploaded attachment's size and SHA-256, then return the short-lived opaque token create_confirmed_draft accepts. This is step 3 of 3, called once after the last upload_attachment_chunk. It fails while bytes are still missing, and a hash mismatch discards the staged upload outright, so restart at begin_attachment_upload rather than retrying. It returns attachment_token plus the verified filename, content_type, size_bytes, sha256, and expires_at, 30 minutes out by default. The token is single-use: creating a draft consumes it, and discard_attachment destroys it early.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
upload_idYesThe upload_id begin_attachment_upload returned, once every chunk has been accepted. Finishing exchanges that id for the attachment token and closes the upload to further chunks.

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 / upload_id / description
      Added value: +"The upload_id begin_attachment_upload returned, once every chunk has been accepted. Finishing exchanges that id for the attachment token and closes the upload to further chunks."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior1/5

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

The description thoroughly discloses failure behavior, single-use token semantics, expiration, and return fields. However, it says a hash mismatch 'discards the staged upload outright', which is a destructive side effect. This directly contradicts the annotation destructiveHint: false. Per the rubric, a contradiction with annotations forces a score of 1 and should be flagged.

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: sequence, failure mode, recovery path, return payload, expiration, and lifecycle consumption. It is front-loaded with the primary purpose and step position, with no filler or repeated schema content.

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?

Despite having an output schema and annotations, the description covers all behavioral context an agent needs: prerequisites, failure handling, restart guidance, token expiry, single-use consumption, and early discard via a sibling. Nothing needed to invoke it correctly is missing.

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%, so the baseline is 3. The description adds meaning beyond the schema by explaining where upload_id comes from ('begin_attachment_upload returned') and what finishing does with it ('exchanges that id for the attachment token and closes the upload'). This is useful semantic context above the schema's own description.

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 ('verify'), a resource ('attachment upload'), and its exact role as 'step 3 of 3'. It also distinguishes itself from siblings by explaining it exchanges upload_id for a token that create_confirmed_draft accepts, so an agent can tell it apart from begin_attachment_upload, upload_attachment_chunk, and discard_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?

Explicitly says when to call it: 'once after the last upload_attachment_chunk'. It also defines failure conditions (bytes still missing), and provides an alternative by instructing to 'restart at begin_attachment_upload rather than retrying'. It even names discard_attachment for early destruction, leaving no ambiguity about sequencing.

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