Begin a multi-call deploy session
begin_deployOpen a staging session for a deploy that is too large for one call: stage files with add_files (repeatable), add_file_chunk, or one tar(.gz) POST to the returned uploadUrl, then publish with commit_deploy. Use begin_deploy only when the files do not fit in one deploy_site or update_site call. Up to 5 open sessions per token; a session expires after 1 hour.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | How commit_deploy will apply the staged files. 'replace' wipes the live site and atomic-renames the staged set into place. 'patch' layers staged files on top of the live site (kept files = live + staged; deletes via commit_deploy's `delete` array). | |
| name | Yes | Name of an existing site (see list_sites). Sessions do not create sites; deploy_site does. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| siteId | Yes | ||
| status | Yes | ||
| deployId | Yes | Pass this id to add_files / commit_deploy / abort_deploy / list_deploys. | |
| siteName | Yes | ||
| expiresAt | Yes | ISO timestamp. The session will be auto-expired and the scratch dir cleaned at this time. | |
| uploadUrl | Yes | POST a tar(.gz) archive here to stage many files in one HTTP call, outside the tool-call output budget. The URL embeds a token scoped to this session, so no Authorization header is needed. Example: `tar -czf - -C dist . | curl --data-binary @- -H "Content-Type: application/octet-stream" "<uploadUrl>"`. Body limit 100 MB (gzipped). Then call commit_deploy. | |
| uploadToken | Yes | The token embedded in uploadUrl, for an Authorization: Bearer header instead. Valid only for POST /upload/<this deployId>, not for tool calls or other sessions. |