Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(data-warehouse): attribute wizard-created sources as created_via=wizard (#70242)

Tom Owerse25d814f30b4
diff --git a/frontend/src/types.ts b/frontend/src/types.ts
index 79554cc376a0..7daee6aae8af 100644
--- a/frontend/src/types.ts
+++ b/frontend/src/types.ts
@@ -6148,7 +6148,7 @@ export interface ExternalDataSource {
prefix: string | null
description: string | null
access_method?: 'warehouse' | 'direct'
- created_via: 'web' | 'api' | 'mcp' | null
+ created_via: 'web' | 'api' | 'mcp' | 'wizard' | null
engine?: 'duckdb' | 'postgres' | 'mysql' | null
latest_error: string | null
last_run_at?: Dayjs
diff --git a/products/data_warehouse/backend/presentation/views/external_data_source.py b/products/data_warehouse/backend/presentation/views/external_data_source.py
index df23925f27f7..5b8c22d5fa4b 100644
--- a/products/data_warehouse/backend/presentation/views/external_data_source.py
+++ b/products/data_warehouse/backend/presentation/views/external_data_source.py
@@ -43,7 +43,7 @@ from posthog.hogql.direct_sql.capability import direct_capable_source_types
from posthog.api.routing import TeamAndOrgViewSetMixin
from posthog.api.utils import action
-from posthog.event_usage import report_user_action
+from posthog.event_usage import EventSource, get_event_source, report_user_action
from posthog.exceptions_capture import capture_exception
from posthog.models.user import User
from posthog.permissions import (
@@ -752,7 +752,8 @@ class ExternalDataSourceSerializers(UserAccessControlSerializerMixin, serializer
allow_null=True,
help_text=(
"How this source was created. Defaults to `api` on create when omitted. "
- "`web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. "
+ "`web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, "
+ "`wizard` for the setup wizard (derived server-side from the wizard's user agent). "
"Ignored on update."
),
)
@@ -1258,10 +1259,21 @@ class ExternalDataSourceCreateSerializer(serializers.Serializer):
help_text="Connection mode: 'warehouse' (import) or 'direct' (live query).",
)
created_via = serializers.ChoiceField(
- choices=ExternalDataSource.CreatedVia.values,
+ # `wizard` is intentionally omitted: it is never accepted from a caller (that would let any
+ # client self-label as wizard-created). It is derived server-side by upgrading a
+ # machine-injected `mcp` value when the request comes from the wizard transport.
+ choices=[
+ ExternalDataSource.CreatedVia.WEB,
+ ExternalDataSource.CreatedVia.API,
+ ExternalDataSource.CreatedVia.MCP,
+ ],
required=False,
default=ExternalDataSource.CreatedVia.API,
- help_text="Where the request came from",
+ help_text=(
+ "Where the request came from: `web` for the in-app UI, `api` for direct API callers, "
+ "`mcp` for agent/MCP tool calls. `wizard` cannot be set directly — it is derived "
+ "server-side for wizard-driven MCP calls. Defaults to `api`."
+ ),
)
direct_query_enabled = serializers.BooleanField(
required=False,
@@ -1859,6 +1871,13 @@ class ExternalDataSourceViewSet(TeamAndOrgViewSetMixin, AccessControlViewSetMixi
# full config + credential gate (including the SSRF host check) before discovering schemas.
# It avoids a second live credential round-trip — and the confusing failure mode where the
# first check passes but a transient blip fails the second, leaving nothing created.
+
+ # The setup wizard drives creation through the MCP tools, which inject `created_via=mcp`
+ # before the request reaches us — the agent can't set the field itself. Upgrade that
+ # machine-injected value to `wizard` when the transport identifies the wizard, so wizard
+ # runs are distinguishable from other MCP clients. Explicit `web`/`api` values are left alone.
+ if created_via == ExternalDataSource.CreatedVia.MCP and get_event_source(request) == EventSource.WIZARD:
+ created_via = ExternalDataSource.CreatedVia.WIZARD
is_direct_query = access_method == ExternalDataSource.AccessMethod.DIRECT
is_direct_mysql = is_direct_query and source_type == ExternalDataSourceType.MYSQL
is_direct_snowflake = is_direct_query and source_type == ExternalDataSourceType.SNOWFLAKE
@@ -2442,9 +2461,11 @@ class ExternalDataSourceViewSet(TeamAndOrgViewSetMixin, AccessControlViewSetMixi
managed_viewset.sync_views()
ensure_person_join(self.team.pk, new_source_model.prefix)
- # `source` (web/api/mcp) is derived from the request by report_user_action; `created_via`
- # is the caller's explicit intent. They usually agree but are kept separate so a transport
- # change (e.g. a new wrapper UA) doesn't silently rewrite historical attribution.
+ # `source` (web/api/mcp/wizard) is derived from the request by report_user_action; `created_via`
+ # is the caller's explicit intent (with one exception: the machine-injected `mcp` is upgraded
+ # to `wizard` above when the transport identifies the wizard). They usually agree but are kept
+ # separate so a transport change (e.g. a new wrapper UA) doesn't silently rewrite historical
+ # attribution.
report_user_action(
cast(User, request.user),
"data warehouse source created",
diff --git a/products/data_warehouse/backend/tests/api/test_external_data_source.py b/products/data_warehouse/backend/tests/api/test_external_data_source.py
index 6d21fcd68acd..ab69fa4135bc 100644
--- a/products/data_warehouse/backend/tests/api/test_external_data_source.py
+++ b/products/data_warehouse/backend/tests/api/test_external_data_source.py
@@ -361,6 +361,41 @@ class TestExternalDataSource(APIBaseTest):
source = ExternalDataSource.objects.get(id=response.json()["id"])
assert source.created_via == created_via
+ @parameterized.expand(
+ [
+ # The MCP tool injects `mcp`; a wizard user agent upgrades it to `wizard`.
+ (ExternalDataSource.CreatedVia.MCP, ExternalDataSource.CreatedVia.WIZARD),
+ # Explicit non-MCP values are never rewritten, even with a wizard user agent.
+ (ExternalDataSource.CreatedVia.WEB, ExternalDataSource.CreatedVia.WEB),
+ (ExternalDataSource.CreatedVia.API, ExternalDataSource.CreatedVia.API),
+ ]
+ )
+ @patch(
+ "products.warehouse_sources.backend.temporal.data_imports.sources.stripe.source.StripeSource.validate_credentials",
+ return_value=(True, None),
+ )
+ def test_create_external_data_source_wizard_user_agent_upgrades_mcp_created_via(
+ self, sent_created_via, expected_created_via, _mock_validate
+ ):
+ response = self.client.post(
+ f"/api/environments/{self.team.pk}/external_data_sources/",
+ data={
+ "source_type": "Stripe",
+ "created_via": sent_created_via,
+ "payload": {
+ "auth_method": {"selection": "api_key", "stripe_secret_key": "sk_test_123"},
+ "schemas": [
+ {"name": STRIPE_CUSTOMER_RESOURCE_NAME, "should_sync": True, "sync_type": "full_refresh"},
+ ],
+ },
+ },
+ headers={"user-agent": "posthog/wizard/1.0.0"},
+ )
+
+ assert response.status_code == 201, response.json()
+ source = ExternalDataSource.objects.get(id=response.json()["id"])
+ assert source.created_via == expected_created_via
+
@patch(
"products.warehouse_sources.backend.temporal.data_imports.sources.stripe.source.StripeSource.validate_credentials",
return_value=(True, None),
@@ -383,13 +418,20 @@ class TestExternalDataSource(APIBaseTest):
source = ExternalDataSource.objects.get(id=response.json()["id"])
assert source.created_via == ExternalDataSource.CreatedVia.API
- def test_create_external_data_source_rejects_invalid_created_via(self):
+ @parameterized.expand(
+ [
+ ("garbage_value", "hacker"),
+ # `wizard` is derived server-side; a caller must not be able to self-label as wizard-created.
+ ("wizard_is_not_caller_settable", ExternalDataSource.CreatedVia.WIZARD),
+ ]
+ )
+ def test_create_external_data_source_rejects_invalid_created_via(self, _name, created_via):
# created_via choice validation happens before credentials, so no StripeSource mock is needed here.
response = self.client.post(
f"/api/environments/{self.team.pk}/external_data_sources/",
data={
"source_type": "Stripe",
- "created_via": "hacker",
+ "created_via": created_via,
"payload": {
"auth_method": {"selection": "api_key", "stripe_secret_key": "sk_test_123"},
"schemas": [
diff --git a/products/warehouse_sources/backend/migrations/0065_alter_externaldatasource_created_via.py b/products/warehouse_sources/backend/migrations/0065_alter_externaldatasource_created_via.py
new file mode 100644
index 000000000000..4b5c478d6c30
--- /dev/null
+++ b/products/warehouse_sources/backend/migrations/0065_alter_externaldatasource_created_via.py
@@ -0,0 +1,27 @@
+# Generated by Django 5.2.14 on 2026-07-11 16:27
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("warehouse_sources", "0064_datawarehousetable_column_order"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="externaldatasource",
+ name="created_via",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("web", "web"),
+ ("api", "api"),
+ ("mcp", "mcp"),
+ ("wizard", "wizard"),
+ ],
+ max_length=20,
+ null=True,
+ ),
+ ),
+ ]
diff --git a/products/warehouse_sources/backend/migrations/max_migration.txt b/products/warehouse_sources/backend/migrations/max_migration.txt
index e1e9b9f7c262..ff94155af48c 100644
--- a/products/warehouse_sources/backend/migrations/max_migration.txt
+++ b/products/warehouse_sources/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0064_datawarehousetable_column_order
+0065_alter_externaldatasource_created_via
diff --git a/products/warehouse_sources/backend/models/external_data_source.py b/products/warehouse_sources/backend/models/external_data_source.py
index 218595c46b76..0ba837f89b63 100644
--- a/products/warehouse_sources/backend/models/external_data_source.py
+++ b/products/warehouse_sources/backend/models/external_data_source.py
@@ -29,6 +29,7 @@ class ExternalDataSource(ModelActivityMixin, CreatedMetaFields, UpdatedMetaField
WEB = "web", "web"
API = "api", "api"
MCP = "mcp", "mcp"
+ WIZARD = "wizard", "wizard"
class Status(models.TextChoices):
RUNNING = "Running", "Running"
diff --git a/products/warehouse_sources/frontend/generated/api.schemas.ts b/products/warehouse_sources/frontend/generated/api.schemas.ts
index b19ad6eb0c83..25cdfb466d70 100644
--- a/products/warehouse_sources/frontend/generated/api.schemas.ts
+++ b/products/warehouse_sources/frontend/generated/api.schemas.ts
@@ -366,13 +366,16 @@ export interface PatchedExternalDataSchemaApi {
* * `web` - web
* * `api` - api
* * `mcp` - mcp
+ * * `wizard` - wizard
*/
-export type CreatedViaEnumApi = (typeof CreatedViaEnumApi)[keyof typeof CreatedViaEnumApi]
+export type ExternalDataSourceSerializersCreatedViaEnumApi =
+ (typeof ExternalDataSourceSerializersCreatedViaEnumApi)[keyof typeof ExternalDataSourceSerializersCreatedViaEnumApi]
-export const CreatedViaEnumApi = {
+export const ExternalDataSourceSerializersCreatedViaEnumApi = {
Web: 'web',
Api: 'api',
Mcp: 'mcp',
+ Wizard: 'wizard',
} as const
/**
@@ -1938,12 +1941,13 @@ export interface ExternalDataSourceSerializersApi {
readonly created_at: string
/** @nullable */
readonly created_by: string | null
- /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.
+ /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.
*
* * `web` - web
* * `api` - api
- * * `mcp` - mcp */
- created_via?: CreatedViaEnumApi | null
+ * * `mcp` - mcp
+ * * `wizard` - wizard */
+ created_via?: ExternalDataSourceSerializersCreatedViaEnumApi | null
readonly status: string
client_secret: string
account_id: string
@@ -2000,6 +2004,20 @@ export interface PaginatedExternalDataSourceSerializersListApi {
*/
export type ExternalDataSourceCreateApiPayload = { [key: string]: unknown }
+/**
+ * * `web` - web
+ * * `api` - api
+ * * `mcp` - mcp
+ */
+export type ExternalDataSourceCreateCreatedViaEnumApi =
+ (typeof ExternalDataSourceCreateCreatedViaEnumApi)[keyof typeof ExternalDataSourceCreateCreatedViaEnumApi]
+
+export const ExternalDataSourceCreateCreatedViaEnumApi = {
+ Web: 'web',
+ Api: 'api',
+ Mcp: 'mcp',
+} as const
+
export interface ExternalDataSourceCreateApi {
/** The source type (e.g. 'Postgres', 'Stripe').
*
@@ -2779,12 +2797,12 @@ export interface ExternalDataSourceCreateApi {
* * `warehouse` - warehouse
* * `direct` - direct */
access_method?: AccessMethodEnumApi
- /** Where the request came from
+ /** Where the request came from: `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. `wizard` cannot be set directly — it is derived server-side for wizard-driven MCP calls. Defaults to `api`.
*
* * `web` - web
* * `api` - api
* * `mcp` - mcp */
- created_via?: CreatedViaEnumApi
+ created_via?: ExternalDataSourceCreateCreatedViaEnumApi
/** Whether a synced source should also be live-queryable via direct connection. Defaults to true; ignored for pure direct-query sources. */
direct_query_enabled?: boolean
}
@@ -2799,12 +2817,13 @@ export interface PatchedExternalDataSourceSerializersApi {
readonly created_at?: string
/** @nullable */
readonly created_by?: string | null
- /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.
+ /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.
*
* * `web` - web
* * `api` - api
- * * `mcp` - mcp */
- created_via?: CreatedViaEnumApi | null
+ * * `mcp` - mcp
+ * * `wizard` - wizard */
+ created_via?: ExternalDataSourceSerializersCreatedViaEnumApi | null
readonly status?: string
client_secret?: string
account_id?: string
diff --git a/products/warehouse_sources/frontend/generated/api.zod.ts b/products/warehouse_sources/frontend/generated/api.zod.ts
index cf1150e19d9d..2bcb20fecbeb 100644
--- a/products/warehouse_sources/frontend/generated/api.zod.ts
+++ b/products/warehouse_sources/frontend/generated/api.zod.ts
@@ -1520,7 +1520,9 @@ export const ExternalDataSourcesCreateBody = /* @__PURE__ */ zod.object({
.enum(['web', 'api', 'mcp'])
.describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp')
.default(externalDataSourcesCreateBodyCreatedViaDefault)
- .describe('Where the request came from\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ .describe(
+ 'Where the request came from: `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. `wizard` cannot be set directly — it is derived server-side for wizard-driven MCP calls. Defaults to `api`.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ ),
direct_query_enabled: zod
.boolean()
.default(externalDataSourcesCreateBodyDirectQueryEnabledDefault)
@@ -1540,12 +1542,14 @@ export const ExternalDataSourcesUpdateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1572,12 +1576,14 @@ export const ExternalDataSourcesPartialUpdateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string().optional(),
account_id: zod.string().optional(),
@@ -1677,12 +1683,14 @@ export const ExternalDataSourcesCheckCdcPrerequisitesForSourceCreateBody = /* @_
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1712,12 +1720,14 @@ export const ExternalDataSourcesCreateWebhookCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1744,12 +1754,14 @@ export const ExternalDataSourcesDeleteWebhookCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1783,12 +1795,14 @@ export const ExternalDataSourcesDisableCdcCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1826,12 +1840,14 @@ export const ExternalDataSourcesEnableCdcCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1858,12 +1874,14 @@ export const ExternalDataSourcesRefreshSchemasCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1890,12 +1908,14 @@ export const ExternalDataSourcesReloadCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1922,12 +1942,14 @@ export const ExternalDataSourcesRevenueAnalyticsConfigPartialUpdateBody = /* @__
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string().optional(),
account_id: zod.string().optional(),
@@ -1962,12 +1984,14 @@ export const ExternalDataSourcesUpdateCdcSettingsCreateBody = /* @__PURE__ */ zo
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1994,12 +2018,14 @@ export const ExternalDataSourcesUpdateWebhookInputsCreateBody = /* @__PURE__ */
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -4434,12 +4460,14 @@ export const ExternalDataSourcesSourcePrefixCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls. Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent\/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n\* `web` - web\n\* `api` - api\n\* `mcp` - mcp\n\* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 07576d536fff..9dfe9fca36e8 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -14686,20 +14686,6 @@ export namespace Schemas {
AiGenerated: 'ai_generated',
} as const;
- /**
- * * `web` - web
- * * `api` - api
- * * `mcp` - mcp
- */
- export type CreatedViaEnum = typeof CreatedViaEnum[keyof typeof CreatedViaEnum];
-
-
- export const CreatedViaEnum = {
- Web: 'web',
- Api: 'api',
- Mcp: 'mcp',
- } as const;
-
/**
* * `default` - Default
* * `template` - Template
@@ -24317,6 +24303,20 @@ export namespace Schemas {
*/
export type ExternalDataSourceCreatePayload = { [key: string]: unknown };
+ /**
+ * * `web` - web
+ * * `api` - api
+ * * `mcp` - mcp
+ */
+ export type ExternalDataSourceCreateCreatedViaEnum = typeof ExternalDataSourceCreateCreatedViaEnum[keyof typeof ExternalDataSourceCreateCreatedViaEnum];
+
+
+ export const ExternalDataSourceCreateCreatedViaEnum = {
+ Web: 'web',
+ Api: 'api',
+ Mcp: 'mcp',
+ } as const;
+
export interface ExternalDataSourceCreate {
/** The source type (e.g. 'Postgres', 'Stripe').
*
@@ -25096,12 +25096,12 @@ export namespace Schemas {
* * `warehouse` - warehouse
* * `direct` - direct */
access_method?: AccessMethodEnum;
- /** Where the request came from
+ /** Where the request came from: `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. `wizard` cannot be set directly — it is derived server-side for wizard-driven MCP calls. Defaults to `api`.
*
* * `web` - web
* * `api` - api
* * `mcp` - mcp */
- created_via?: CreatedViaEnum;
+ created_via?: ExternalDataSourceCreateCreatedViaEnum;
/** Whether a synced source should also be live-queryable via direct connection. Defaults to true; ignored for pure direct-query sources. */
direct_query_enabled?: boolean;
}
@@ -25140,6 +25140,22 @@ export namespace Schemas {
export type ExternalDataSourceSerializersSchemasItem = { [key: string]: unknown };
+ /**
+ * * `web` - web
+ * * `api` - api
+ * * `mcp` - mcp
+ * * `wizard` - wizard
+ */
+ export type ExternalDataSourceSerializersCreatedViaEnum = typeof ExternalDataSourceSerializersCreatedViaEnum[keyof typeof ExternalDataSourceSerializersCreatedViaEnum];
+
+
+ export const ExternalDataSourceSerializersCreatedViaEnum = {
+ Web: 'web',
+ Api: 'api',
+ Mcp: 'mcp',
+ Wizard: 'wizard',
+ } as const;
+
/**
* Mixin for serializers to add user access control fields
*/
@@ -25148,12 +25164,13 @@ export namespace Schemas {
readonly created_at: string;
/** @nullable */
readonly created_by: string | null;
- /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.
+ /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.
*
* * `web` - web
* * `api` - api
- * * `mcp` - mcp */
- created_via?: CreatedViaEnum | null;
+ * * `mcp` - mcp
+ * * `wizard` - wizard */
+ created_via?: ExternalDataSourceSerializersCreatedViaEnum | null;
readonly status: string;
client_secret: string;
account_id: string;
@@ -40737,12 +40754,13 @@ export namespace Schemas {
readonly created_at?: string;
/** @nullable */
readonly created_by?: string | null;
- /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.
+ /** How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.
*
* * `web` - web
* * `api` - api
- * * `mcp` - mcp */
- created_via?: CreatedViaEnum | null;
+ * * `mcp` - mcp
+ * * `wizard` - wizard */
+ created_via?: ExternalDataSourceSerializersCreatedViaEnum | null;
readonly status?: string;
client_secret?: string;
account_id?: string;
diff --git a/services/mcp/src/generated/warehouse_sources/api.ts b/services/mcp/src/generated/warehouse_sources/api.ts
index cf15b3966875..8c4ef4103fa5 100644
--- a/services/mcp/src/generated/warehouse_sources/api.ts
+++ b/services/mcp/src/generated/warehouse_sources/api.ts
@@ -1452,12 +1452,14 @@ export const ExternalDataSourcesPartialUpdateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('* `web` - web\n* `api` - api\n* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
),
client_secret: zod.string().optional(),
account_id: zod.string().optional(),
@@ -1505,12 +1507,14 @@ export const ExternalDataSourcesCreateWebhookCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('* `web` - web\n* `api` - api\n* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1546,12 +1550,14 @@ export const ExternalDataSourcesDeleteWebhookCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('* `web` - web\n* `api` - api\n* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
@@ -1583,12 +1589,14 @@ export const ExternalDataSourcesRefreshSchemasCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('* `web` - web\n* `api` - api\n* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
),
direct_query_enabled: zod
.boolean()
@@ -1615,12 +1623,14 @@ export const ExternalDataSourcesReloadCreateBody = /* @__PURE__ */ zod
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('* `web` - web\n* `api` - api\n* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
),
direct_query_enabled: zod
.boolean()
@@ -1672,12 +1682,14 @@ export const ExternalDataSourcesUpdateWebhookInputsCreateBody = /* @__PURE__ */
.object({
created_via: zod
.union([
- zod.enum(['web', 'api', 'mcp']).describe('* `web` - web\n* `api` - api\n* `mcp` - mcp'),
+ zod
+ .enum(['web', 'api', 'mcp', 'wizard'])
+ .describe('* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard'),
zod.null(),
])
.optional()
.describe(
- 'How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp'
+ "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
),
client_secret: zod.string(),
account_id: zod.string(),
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create-webhook-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create-webhook-create.json
index 9a4cc9c94602..acc4ee22d2dd 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create-webhook-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create-webhook-create.json
@@ -10,15 +10,15 @@
"created_via": {
"anyOf": [
{
- "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp",
- "enum": ["web", "api", "mcp"],
+ "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard",
+ "enum": ["web", "api", "mcp", "wizard"],
"type": "string"
},
{
"type": "null"
}
],
- "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp"
+ "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
},
"description": {
"anyOf": [
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-delete-webhook-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-delete-webhook-create.json
index 9a4cc9c94602..acc4ee22d2dd 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-delete-webhook-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-delete-webhook-create.json
@@ -10,15 +10,15 @@
"created_via": {
"anyOf": [
{
- "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp",
- "enum": ["web", "api", "mcp"],
+ "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard",
+ "enum": ["web", "api", "mcp", "wizard"],
"type": "string"
},
{
"type": "null"
}
],
- "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp"
+ "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
},
"description": {
"anyOf": [
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-partial-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-partial-update.json
index 4f3af95ae3aa..efd983121b22 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-partial-update.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-partial-update.json
@@ -10,15 +10,15 @@
"created_via": {
"anyOf": [
{
- "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp",
- "enum": ["web", "api", "mcp"],
+ "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard",
+ "enum": ["web", "api", "mcp", "wizard"],
"type": "string"
},
{
"type": "null"
}
],
- "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp"
+ "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
},
"description": {
"anyOf": [
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-refresh-schemas.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-refresh-schemas.json
index 178a6f845287..1bb2eaaf8788 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-refresh-schemas.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-refresh-schemas.json
@@ -4,15 +4,15 @@
"created_via": {
"anyOf": [
{
- "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp",
- "enum": ["web", "api", "mcp"],
+ "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard",
+ "enum": ["web", "api", "mcp", "wizard"],
"type": "string"
},
{
"type": "null"
}
],
- "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp"
+ "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
},
"direct_query_enabled": {
"description": "Whether this synced source is also live-queryable via direct connection. Defaults to true for new sources; ignored for pure direct-query sources.",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-reload.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-reload.json
index 178a6f845287..1bb2eaaf8788 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-reload.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-reload.json
@@ -4,15 +4,15 @@
"created_via": {
"anyOf": [
{
- "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp",
- "enum": ["web", "api", "mcp"],
+ "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard",
+ "enum": ["web", "api", "mcp", "wizard"],
"type": "string"
},
{
"type": "null"
}
],
- "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp"
+ "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
},
"direct_query_enabled": {
"description": "Whether this synced source is also live-queryable via direct connection. Defaults to true for new sources; ignored for pure direct-query sources.",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-update-webhook-inputs-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-update-webhook-inputs-create.json
index 9a4cc9c94602..acc4ee22d2dd 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-update-webhook-inputs-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-update-webhook-inputs-create.json
@@ -10,15 +10,15 @@
"created_via": {
"anyOf": [
{
- "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp",
- "enum": ["web", "api", "mcp"],
+ "description": "* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard",
+ "enum": ["web", "api", "mcp", "wizard"],
"type": "string"
},
{
"type": "null"
}
],
- "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls. Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp"
+ "description": "How this source was created. Defaults to `api` on create when omitted. `web` for the in-app UI, `api` for direct API callers, `mcp` for agent/MCP tool calls, `wizard` for the setup wizard (derived server-side from the wizard's user agent). Ignored on update.\n\n* `web` - web\n* `api` - api\n* `mcp` - mcp\n* `wizard` - wizard"
},
"description": {
"anyOf": [