recreate_stack
Redeploy a Portainer stack by recreating it, capturing its definition for audit before changes. Use dry_run to preview, since the action has no undo.
Instructions
[WRITE][risk=high] Redeploy (recreate) a Portainer stack. No undo.
Captures the stack definition for audit before Portainer recreates it; there is no clean inverse for a redeploy. Requires a portainer target. Pass dry_run=True to preview.
Args: stack_id: Portainer stack id. endpoint_id: Endpoint id the stack runs on; omit to use the stack's own. dry_run: If True, preview without recreating. target: Target name from config; omit for the default.
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": {
"stack_id": "<stack_id>"
},
"name": "recreate_stack"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| dry_run | No | ||
| stack_id | Yes | ||
| endpoint_id | No |