add_app_bucket
Provision a managed MinIO bucket for an app + publish AWS_* credentials into the app's env automatically.
M1 behavior:
Verify caller owns the app
POST to libvirt :8001 /api/app-infra/buckets (stub mode by default — no real MinIO VM needed for M1)
PUT 5 env keys (OF_S3_ENDPOINT, OF_S3_BUCKET, OF_S3_ACCESS_KEY, OF_S3_SECRET_KEY, OF_S3_REGION) into the app's env via the producer API
Append bucket_id to App.bucket_refs
Return {bucket_id, status, env_keys, env_published}
When OPENFACTORY_STORAGE_PRODUCER_TOKEN is unset, step 3 is skipped
and the connection dict (INCLUDING secret_key — shown exactly once) is
returned in the response so the caller can manually publish via
set_app_env(app_id, set={...}). App code reads with explicit
kwargs: boto3.client('s3', endpoint_url=os.environ['OF_S3_ENDPOINT'], aws_access_key_id=os.environ['OF_S3_ACCESS_KEY'], aws_secret_access_key=os.environ['OF_S3_SECRET_KEY']).
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": {
"app_id": "<app_id>"
},
"name": "add_app_bucket"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | App ID (UUID from create_app). | |
| api_key | No | MCP API key | |
| session_token | No | Session token |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||