{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Connect a Worker tag to a repository and production build settings.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/builds_account_id"}},"required":["account_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/builds_CreateWorkerRequest","examples":[{"git_repository":{"branch":"main","provider_account_id":"cloudflare","provider_account_name":"Cloudflare","provider_type":"github","repo_id":"workers-sdk","repo_name":"workers-sdk"},"previews_base_config":{"build_caching_enabled":true,"build_command":"npm run build","build_token_uuid":"4b1e4d0f-6f2a-4c9d-9a3b-7c5e2f8a1d64","deploy_command":"npx wrangler preview","environment_variables":{},"path_excludes":["*.md"],"path_includes":["*"],"root_directory":"/"},"previews_enabled":true,"production_settings":{"build_caching_enabled":true,"build_command":"npm run build","build_token_uuid":"4b1e4d0f-6f2a-4c9d-9a3b-7c5e2f8a1d64","deploy_command":"npx wrangler deploy","environment_variables":{},"path_excludes":["*.md"],"path_includes":["*"],"root_directory":"/"},"script_tag":"my-worker"}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"builds_account_id":{"description":"Account identifier.","type":"string","examples":["account-123"]},"builds_CreateWorkerRequest":{"description":"Request body for creating a Worker build configuration.","type":"object","properties":{"git_repository":{"$ref":"#/definitions/builds_CreateWorkerGitRepositoryInput"},"previews_base_config":{"$ref":"#/definitions/builds_CreateWorkerBuildSettingsInput"},"previews_enabled":{"description":"Whether Previews are enabled for this Worker","type":"boolean","examples":[false]},"production_settings":{"$ref":"#/definitions/builds_CreateWorkerBuildSettingsInput"},"script_tag":{"$ref":"#/definitions/builds_external_script_id"}},"required":["script_tag","git_repository","production_settings","previews_enabled","previews_base_config"]},"builds_CreateWorkerGitRepositoryInput":{"oneOf":[{"$ref":"#/definitions/builds_CreateWorkerGitRepositoryFunfettiInput"},{"$ref":"#/definitions/builds_CreateWorkerGitRepositoryGrantInput"}]},"builds_CreateWorkerBuildSettingsInput":{"description":"Build and deploy settings when creating a Worker build configuration","type":"object","properties":{"build_caching_enabled":{"description":"Whether builds reuse cached dependencies and build artifacts.","type":"boolean","default":true,"examples":[true]},"build_command":{"$ref":"#/definitions/builds_build_command"},"build_token_uuid":{"$ref":"#/definitions/builds_build_token_uuid"},"deploy_command":{"$ref":"#/definitions/builds_deploy_command"},"environment_variables":{"$ref":"#/definitions/builds_EnvironmentVariablesRequest"},"path_excludes":{"$ref":"#/definitions/builds_path_excludes"},"path_includes":{"$ref":"#/definitions/builds_path_includes"},"root_directory":{"default":"/","allOf":[{"$ref":"#/definitions/builds_root_directory"}]}},"required":["build_command","deploy_command","build_token_uuid"]},"builds_external_script_id":{"description":"System-generated tag of the Worker. This is not the Worker name.","type":"string","examples":["dd7160bb9cef458093557736f4b9e75b"]},"builds_CreateWorkerGitRepositoryFunfettiInput":{"description":"GitHub or GitLab repository input for creating a Worker build configuration","type":"object","properties":{"branch":{"description":"Git branch to watch for builds","type":"string","maxLength":256,"minLength":1,"examples":["main"]},"provider_account_id":{"$ref":"#/definitions/builds_provider_account_id"},"provider_account_name":{"$ref":"#/definitions/builds_provider_account_name"},"provider_type":{"type":"string","enum":["github","gitlab"],"examples":["github"]},"repo_id":{"$ref":"#/definitions/builds_repo_id"},"repo_name":{"$ref":"#/definitions/builds_repo_name"}},"required":["repo_id","repo_name","provider_type","provider_account_id","provider_account_name","branch"]},"builds_CreateWorkerGitRepositoryGrantInput":{"description":"Grant-backed repository input for creating a Worker build configuration","type":"object","properties":{"branch":{"description":"Git branch to watch for builds","type":"string","maxLength":256,"minLength":1,"examples":["main"]},"grant_id":{"description":"Grant ID required for grant-backed providers","type":"string","minLength":1,"examples":["grant-123"]},"provider_account_id":{"$ref":"#/definitions/builds_provider_account_id"},"provider_account_name":{"$ref":"#/definitions/builds_provider_account_name"},"provider_type":{"type":"string","enum":["gitlab_internal","origin"],"examples":["gitlab_internal"]},"repo_id":{"$ref":"#/definitions/builds_repo_id"},"repo_name":{"$ref":"#/definitions/builds_repo_name"}},"required":["repo_id","repo_name","provider_type","provider_account_id","provider_account_name","branch","grant_id"]},"builds_build_command":{"description":"Command to build the Worker.","type":"string","examples":["npm run build"]},"builds_build_token_uuid":{"description":"UUID of the build token used when deploying the Worker.","type":"string","format":"uuid"},"builds_deploy_command":{"description":"Command to deploy the Worker.","type":"string","examples":["npx wrangler deploy"]},"builds_EnvironmentVariablesRequest":{"description":"Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores.","type":"object","additionalProperties":{"properties":{"is_secret":{"$ref":"#/definitions/builds_is_secret"},"value":{"description":"Value made available to the build. Maximum length is 5000 characters.","type":"string","maxLength":5000,"examples":["production"]}},"required":["is_secret","value"],"type":"object"},"examples":[{"API_KEY":{"is_secret":true,"value":"secret-key"},"NODE_ENV":{"is_secret":false,"value":"production"}}]},"builds_path_excludes":{"description":"Path patterns that must not start builds.","type":"array","items":{"type":"string"},"examples":[["*.md"]]},"builds_path_includes":{"description":"Path patterns that can start builds.","type":"array","items":{"type":"string"},"default":["*"],"examples":[["*"]]},"builds_root_directory":{"description":"Repository directory in which build and deploy commands run.","type":"string","examples":["/"]},"builds_provider_account_id":{"description":"Provider-specific identifier of the account or namespace that owns the repository.","type":"string","examples":["cloudflare"]},"builds_provider_account_name":{"description":"Human-readable name of the account or namespace that owns the repository.","type":"string","examples":["Cloudflare"]},"builds_repo_id":{"description":"Provider-specific repository identifier.","type":"string","examples":["workers-sdk"]},"builds_repo_name":{"description":"Human-readable repository name.","type":"string","examples":["workers-sdk"]},"builds_is_secret":{"description":"Whether to hide the value after it is saved. Secret values remain available to builds but appear as `null` when you list variables; non-secret values remain visible.","type":"boolean","examples":[false]}}},"name":"Create Worker build configuration","id":"cloudflare.createworkerbuild","example":{"path":{"account_id":"account-123"},"body":{"script_tag":"dd7160bb9cef458093557736f4b9e75b","git_repository":{"repo_id":"workers-sdk","repo_name":"workers-sdk","provider_type":"github","provider_account_id":"cloudflare","provider_account_name":"Cloudflare","branch":"main"},"production_settings":{"build_command":"npm run build","deploy_command":"npx wrangler deploy","build_token_uuid":"00000000-0000-4000-8000-000000000000"},"previews_enabled":false,"previews_base_config":{"build_command":"npm run build","deploy_command":"npx wrangler deploy","build_token_uuid":"00000000-0000-4000-8000-000000000000"}}},"maxRequests":1,"summary":false}}