Deploy files
Send the project's files as JSON and deploy them in one call: HCode zips them, uploads the archive and starts a deploy, as if you had uploaded a ZIP. Send files as [{path, content}] (content is UTF-8 text, or base64 with encoding: "base64" for images and other binary files), or a whole ZIP as base64 in archive. Paths are relative to the project root, such as index.html or src/server.js. The request body is limited to 1 MiB; upload a ZIP with createSourceUpload for larger projects. The project must exist: send files to createApplicationProject to create one from them. Returns uploadId and deploymentId: wait on the deployment with getDeployment and waitSeconds.
Queued work: send an idempotencyKey and reuse the same value when retrying this exact call.
Arguments
| Name | Type | Required | Limits |
|---|---|---|---|
files | object[] | No | See schema |
archive | string | No | At least 1 character(s) |
projectId | string | Yes | At least 1 character(s) |
idempotencyKey | string | Yes | At least 1 character(s) |
Full input schema
{
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string"
},
"encoding": {
"type": "string",
"enum": [
"utf8",
"base64"
]
}
},
"required": [
"path",
"content"
],
"additionalProperties": false
}
},
"archive": {
"type": "string",
"minLength": 1
},
"projectId": {
"type": "string",
"minLength": 1
},
"idempotencyKey": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Unique request key. Reuse this exact value when retrying the same operation."
}
},
"required": [
"projectId",
"idempotencyKey"
],
"additionalProperties": false
}Example call
The params of a tools/call request. Replace the placeholder values with your own IDs.
{
"name": "deployFiles",
"arguments": {
"projectId": "REPLACE_WITH_PROJECT_ID",
"idempotencyKey": "REPLACE_WITH_IDEMPOTENCY_KEY"
}
} Result
The same data as the API operation, wrapped as {"untrusted_data": true, "source": "deployFiles", "note": "...", "data": ...} so the model treats project content as data, not instructions.