MCP
upload_document
Attach a base64-encoded file to a workflow step as a step document.
upload_document attaches a base64-encoded file to a workflow step as a step document. It requires the write:documents scope.
Unlike every other write in this API, it applies immediately: there’s no suggestion to approve first. That’s safe because the action can only add a document: the upload is attributed to the connected user, and it can only land on a step they’re already permitted to access.
| Field | Type | Required | Notes |
|---|---|---|---|
stepId |
string | Yes | Target workflow step. The connected user must have access to it. |
fileName |
string | Yes | Display file name, shown to anyone who later views the step’s documents. |
fileData |
string | Yes | Base64-encoded file content. Decoded size must be 10 MB or less: invalid base64 or an oversize file is rejected. |
mimeType |
string | No | MIME type, such as text/plain or application/pdf. |
Example
Section titled “Example”{ "name": "upload_document", "arguments": { "stepId": "step_123", "fileName": "evidence-summary.txt", "fileData": "RXhhbXBsZSBldmlkZW5jZSBzdW1tYXJ5Lg==", "mimeType": "text/plain" }}After the Upload
Section titled “After the Upload”The file appears immediately among the step’s documents, attributed to the connected user as uploader: there’s no waiting for anyone else to act first.
It then passes a validation stage before it’s usable: pending → validated or rejected. See Documents for what validation covers.
Agent Notes
Section titled “Agent Notes”- Upload only files the user actually provided, or explicitly asked you to create.
- Double-check the
stepIdandfileNamebefore calling: because this write applies immediately, there’s no review step to catch a mistake. - To link to an external document instead of uploading a file, use suggest_change with
itemType: "stepdocumentlink": that goes through review, and accepts onlyhttporhttpsURLs. - Every other write in this API goes through a suggestion for review; this one doesn’t. If the user expects a chance to review it first, tell them the upload already happened.