upload_task_attachment
Attach a file to a task from base64 content (fileName + mimeType + contentBase64). Max 25 MB. Any project contributor or above can attach (VIEWERs cannot). The file is stored and a TaskAttachment row is created, exactly like a human upload. For integrity, ALSO pass sizeBytes (raw byte length) and/or sha256 (hex of the raw bytes): the tool then REJECTS a truncated or garbled upload instead of silently storing a corrupt file. Strongly recommended for binaries (docx/xlsx/pdf/png), where base64 sent through the model can truncate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha256 | No | Optional but recommended: SHA-256 of the RAW file bytes, 64-char hex. Rejected if the decoded bytes do not match (catches truncated/garbled base64). | |
| taskId | Yes | The task to attach to. | |
| fileName | Yes | Original file name incl. extension, e.g. "chart.png". | |
| mimeType | Yes | MIME type, e.g. "image/png", "text/csv", "application/pdf". | |
| sizeBytes | No | Optional but recommended: exact byte length of the RAW file. Rejected if the decoded length differs (catches truncation). | |
| contentBase64 | Yes | Base64-encoded file bytes. Max 25 MB decoded. | |
| idempotencyKey | No | Optional idempotency key. Pass a stable unique value (e.g. a UUID) to make this create safe to retry: calling again with the same key within 24h - even from a new session after a reconnect - replays the original result and creates no duplicate. Org-scoped; works across conversations. |