download_app
Downloads an application's files as a zip to a given path by creating and downloading a manual snapshot. If creation is still running, use the job ID to track it and retry.
Instructions
Downloads the application's files as a zip and writes it to the given path. It takes a manual snapshot of the application (it counts against the snapshot quota and shows up in list_snapshots) and downloads that snapshot, so the key needs the snapshots:write and snapshots:read scopes. Taking the snapshot can outlast one call: wait_seconds (default and maximum 25) waits for it; if it is still running the answer is { status: "accepted", job_id, message } (NOT an error): follow job_id with get_snapshot_job (scope applications, resource_id = this application) until it is ready, then call download_snapshot with its snapshot_id. A job that ends failed is returned as an error with the job's reason. Past the snapshot limit the answer is 429 SNAPSHOT_RATE_LIMITED (details.scope, details.retry_after, details.resets_at for the account quota); an account without a plan gets 403 PLAN_NOT_ALLOWED but can still list and download the snapshots it already has. A single file is read with read_file. (scope: snapshots:write)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"dest": "<dest>"
},
"name": "download_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Application ID | |
| dest | Yes | Path of the .zip file to write | |
| wait_seconds | No | How long to wait for the snapshot to be taken, in seconds (default and max 25) | |
| workspace_id | No | ID of the workspace that owns the resource, if any |