create_stack
Create a deployable stack from a template by selecting a domain, then let Staticbot route it to the correct hosting target.
Instructions
Create a new infrastructure stack from a template. A stack ties a template to a domain and becomes deployable. Call list_templates first to find the right templateId. Staticbot analyzes the template's repository and owns the hosting decision: static sites route to the supported AWS static target, SSR/full-stack apps route to the supported Cloudflare Workers target. Report the returned hostingWorkload, deploymentTarget, and infrastructureOwnership fields to the user.
Never invent a provider or an account. Cloudflare alone accepts an account-placement default during stack creation because a customer Worker stack pins its connected integration and resolved zone. If the user wants that, call list_cloudflare_hosting_targets, let them choose, then preflight_cloudflare_hosting and pass the preflighted value as cloudflareChoice. Otherwise omit it for Staticbot hosting. For an AWS static site, create the stack first, then call list_aws_hosting_targets with its stackId and pass the selected value to create_deployment as targetAccountId. There is no AWS account field on create_stack.
For templates that use Supabase, pass supabaseIntegrationInstanceId + supabaseProjectRef. Staticbot fills and refreshes the declared Supabase configuration from the connected account; never ask the user for Supabase API keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for the stack (e.g. 'My Portfolio Site') | |
| templateId | Yes | Template ID — get this from list_templates | |
| domainOption | Yes | How to assign a domain to this stack | |
| configOverrides | No | Non-secret key/value overrides for template config variables. See get_template for available keys. Never put passwords, tokens, private keys, or provider credentials here — secret-looking keys are REJECTED, not ignored, because this connection cannot carry credential values. | |
| cloudflareChoice | No | Optional, Cloudflare Workers / SSR apps only. Where to host the app: the `value` of a choice from list_cloudflare_hosting_targets (its `managed.value` for Staticbot hosting, or a `customerOptions[].value` for the user's own Cloudflare account). Omit for Staticbot hosting. Only pass a value that response returned, and only after preflight_cloudflare_hosting returned ok — the domain must already live in one of that account's zones. | |
| supabaseProjectRef | No | Optional. Supabase project reference (the subdomain part of https://<ref>.supabase.co) — get it from list_supabase_projects. Must be set together with supabaseIntegrationInstanceId to enable auto-refresh. | |
| supabaseIntegrationInstanceId | No | Optional. Supabase integration instance ID from list_integration_instances. Combined with supabaseProjectRef, enables auto-refresh of anon keys from Supabase Management API on each deploy — you never have to manually rotate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Parsed JSON response from the Staticbot public API |