{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/builds_account_id"},"script_tag":{"$ref":"#/definitions/builds_external_script_id","description":"The Worker script tag (external script ID)"}},"required":["account_id","script_tag"],"additionalProperties":false},"body":{"$ref":"#/definitions/builds_MigrateToPreviewsRequest","examples":[{}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"builds_account_id":{"description":"Account identifier.","type":"string","examples":["account-123"]},"builds_external_script_id":{"description":"System-generated tag of the Worker. This is not the Worker name.","type":"string","examples":["dd7160bb9cef458093557736f4b9e75b"]},"builds_MigrateToPreviewsRequest":{"description":"Request body for migrating a Worker's legacy non-production trigger to Previews.","type":"object","properties":{"deploy_command":{"description":"Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.","type":"string","examples":["npx wrangler preview"]}}}}},"name":"Migrate worker to previews","id":"cloudflare.migrateworkertopreviews","example":{"path":{"account_id":"account-123","script_tag":"dd7160bb9cef458093557736f4b9e75b"},"body":{}},"maxRequests":1,"summary":false}}