Create bundle upload
create_bundle_uploadTo update a site with photos without resending its unchanged files, pass site_id and manifest: the answer lists the files it lacks. Otherwise, start a bundle upload for bytes that html or files cannot carry: a site with images, fonts or other binaries (a built React site), or a single binary file (a PDF, a .docx, .pptx or .xlsx, an image, a video, an audio), sent as it is under its filename, given here once. Text goes as html or files, with no upload. Returns an upload_id to send the bytes against, then publish_site or update_site with that upload_id instead of html/files/zipBase64. Sending the bytes needs a shell that makes the SnapHost tool calls itself. A shell here is a coding agent in a terminal (Claude Code, Cursor, Codex CLI); a chat app's code sandbox does not count, since its output would have to be retyped into the call. Without a shell, do not open an upload and do not build base64. Ask the person to drop the file (downloaded from the chat if it lives there; a .zip of the built folder with index.html at its root for an app) on the dashboard, after switching the dashboard to the workspace you name: the drive (https://app.snaphost.ai/) for a new site, or the site's own page (https://app.snaphost.ai/sites/<site_id>, "Upload a new version") to keep an existing link; the site_id comes from list_sites or the publish result. Then list_sites shows it (a new site is the newest, named after the file) and every sharing tool applies. With a shell, two ways to send it. Send it with upload_bundle_part, one numbered part per call: a tool call on this connection, so it works even with no network of its own. Or PUT the .zip to upload_url (HTTP PUT, Content-Type application/zip; above max_part_bytes, to upload_url/parts/0, /parts/1, ... in order), which is fewer, larger requests when your shell can reach that host; storage_url is the same PUT straight to the storage host, one request, up to the bundle cap. Tool calls and your shell do not share a network: a PUT that is refused (a 403 naming the host, or a connection that never leaves) says nothing about upload_bundle_part, so switch to it without asking the owner to change network settings. The upload is single-use and expires 15 minutes after it opens. It belongs to the workspace this call acts in: pass the same workspace_id to every upload_bundle_part and to the publish.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_bundle_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | No | With `manifest`: the site this upload will update. Only update_site for this site can use the upload; a new site is published from a zip, `files` or `html`. | |
| filename | No | The single file's own name with its extension (`report.pdf`, `talk.mp4`), when the upload is one non-zip file rather than a .zip. The upload then remembers it: the parts and the publish need not repeat it. Omit for a .zip. | |
| manifest | No | To update an existing site (a website with photos) without sending the files it already holds, with `site_id`: one entry for EVERY file the new version should hold, changed or not (a file left out is removed), with `path` relative to the site root with forward slashes (`index.html`, `img/hero.jpg`), `sha256` of its bytes as 64 lowercase hex digits (`shasum -a 256 <file>`) and `size` in bytes (`wc -c < <file>`). The answer lists the files the site lacks; send only those with upload_blob (or PUT to `blob_upload_url`), then update_site with the `upload_id`. Needs a shell that hashes and encodes the files; without one, send changed text with `changes` on update_site. Omit for a .zip or a single file. | |
| workspace_id | No | Optional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for). |