Finalize attachment upload
finish_attachment_uploadVerify 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"upload_id": "<upload_id>"
},
"name": "finish_attachment_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upload_id | Yes | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||