Agent Operating Guide
/coach-document-upload
Upload a file to a workflow step in one call and get back a document id you can reference from a form field or another suggestion.
Upload a file to a workflow step so it appears there as
evidence, a deliverable, or a form file value. The skill resolves the target step,
base64-encodes the file, and calls upload_document once,
returning the new document’s id. This is the one write that is not a suggestion:
upload_document writes the file directly into Canvas storage and it is visible on the
step immediately, with no review-and-approve cycle. The human gate is your choice to
upload in the first place.
When to use
Section titled “When to use”When you want to upload, attach, or add a document, file, evidence, or supporting material to a step. To link an external URL instead of uploading bytes, use /coach-document-link. To attach against an item rather than a known step, use /coach-item-document-attach.
Inputs
Section titled “Inputs”| Flag | Required | Notes |
|---|---|---|
--step-id <id> |
If not clear from context | The step to upload to. Inferred from the current view if absent, or you’re asked to pick. |
--file-path <path> or --content-base64 <text> --file-name <name> |
Yes (one source) | Read from a local file, or supply already-prepared base64 with a filename. |
--mime-type <type> |
No | Inferred from the file extension if absent. |
Example
Section titled “Example”/coach-document-upload --step-id <id> --file-path vendor-soc2.pdf reads the file,
base64-encodes it, infers application/pdf from the extension, and calls
upload_document. The reply gives you the document id and a link to the step viewer,
where the file is already visible: there is no approval step.
Good to know
Section titled “Good to know”- The write is immediate. Unlike a suggestion, the upload takes effect at once, so the handoff link goes to the step viewer, not a review-and-approve link.
- Size is capped. The platform enforces a per-file size limit: the error names it if you hit it. For very large files, link a URL with /coach-document-link instead of uploading binaries.
- The mime type is inferred from the extension; an unrecognized type falls back to
application/octet-stream. - The returned id populates form file fields. Pass
[documentId]as the value when /coach-form-fill submits a file field: bytes are never inlined into form values. - Archived steps lock their documents, so uploads to a locked step are rejected.
Related
Section titled “Related”- /coach-document-link: attach an external URL instead, through review.
- /coach-form-fill: use the returned id to populate a form’s file field.
- upload_document: the direct file-write tool underneath.
- Documents: how Canvas stores files and links on steps.