create_template
Create a reusable template by scanning a source repository (GitHub/GitLab) to auto-detect platform, environment variables, and build configuration for hosting or migration.
Instructions
Create a new template by scanning a source repository (GitHub or GitLab). Auto-detects platforms, env vars, and builders. Both public and private repositories are supported through the organization's connected Staticbot source-control integration. Before asking the user for a URL, call list_source_repositories and use an unambiguous repository match from the current client/project context, passing that repository's integrationInstanceId as sourceControlIntegrationInstanceId — with several accounts connected, only that one's token can read the repo, and omitting it makes a private repository look missing. If no source-control integration is connected, direct the user to https://app.staticbot.dev/integrations and retry after they connect it. Never claim the repository must be public. Staticbot also classifies the repository's hosting workload; inspect the returned hostingWorkload and isSsr fields instead of choosing AWS or Cloudflare from agent-side heuristics. A template is the shared starting point for BOTH Staticbot paths — hosting the repository and migrating the app off its builder — so creating one does not commit the user to a migration. Use it when no existing template from list_templates matches the repo. The name is optional — if omitted, it's derived from the repo name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Template name (derived from repo name if omitted) | |
| repoLink | Yes | Repository URL (public or private; e.g. https://github.com/owner/repo or https://gitlab.com/group/project). Resolve it with list_source_repositories when a source-control integration is connected. | |
| sourceControlIntegrationInstanceId | No | The repository's integrationInstanceId from list_source_repositories — the account it is hosted in. Pass it whenever the repo came from discovery: with several accounts connected on one provider, only that account's token can read it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Parsed JSON response from the Staticbot public API |