Add a volume to an app
add_volumeGives a deployed app a volume mounted at a directory, so the data the app writes there (uploads, generated files) survives deploys and restarts. For an app whose data is a SQLite file, call add_sqlite_database instead: it also backs the file up. The app restarts. Files already at that path on the app's own disk are not copied into the volume: what the app saved there before is gone after the restart. get_app lists the volumes an app has. Not for a static site. A volume costs money every month: tell the user the price (detect_source and this tool's answer give it) and confirm with the user first.
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": {
"name": "<name>",
"mount_path": "<mount_path>"
},
"name": "add_volume"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The app's name. | |
| size_gb | No | Size in GB (default 1, at most 100; a larger volume is made in the console). | |
| mount_path | Yes | The absolute directory inside the app that the app writes its data to, such as /data. |