Large-file upload
Publish a large local video (e.g. a file on the user's computer) when there is no public mediaUrl.
User intents
"Upload a video from my computer to YouTube." "I have a big local file — give me an upload link."
Required information
- The target channel (
connectionId). - Nothing about the file itself — the browser upload page reads file name, MIME type, and size automatically.
Preconditions
- An active connection with a valid token.
- The user can open a browser upload page.
Tool sequence
Create an upload session
create_assignment_upload_session with connectionId only. It returns a sessionId and an uploadPageUrl.
Hand the upload page to the user
Give the user the uploadPageUrl and ask them to upload the file there.
Poll the session
get_assignment_upload_session with sessionId until status is completed.
Create the assignment
create_assignment with uploadSessionId (and no mediaUrl/fileContent), plus type and payload.
Do not ask the user for file name, MIME type, or size, and never invent placeholder metadata — the browser detects it from the selected file.
REST alternative
Upload-session endpoints back these MCP tools; for direct REST publishing with a public URL use POST /api/v1/assignments. See the Assignments reference.
Recovery paths
- Session
expired,cancelled, orconsumed— create a new session; do not reuse it. create_assignmentbeforecompleted— wait; only publish once the session status iscompleted.- Token expired — re-authorize via
get_oauth_connect_url.
Example prompt → result
"Upload a local video to my 'Tech Reviews' channel, title 'Behind the scenes', public."
Result: the agent returns an upload link; after upload completes, it creates a published assignment from the session.
Common mistakes
- Asking the user for a
mediaUrlwhen they explicitly want a local/browser upload. - Publishing from a session whose status is not yet
completed.