: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(data-warehouse): default the schemas array when creating a source (#82917)
Tom Owers4af68a0de55c
diff --git a/products/warehouse_sources/backend/presentation/views/external_data_source.py b/products/warehouse_sources/backend/presentation/views/external_data_source.pyindex 9d66e3f53ed7..c65f7d1bd135 100644--- a/products/warehouse_sources/backend/presentation/views/external_data_source.py+++ b/products/warehouse_sources/backend/presentation/views/external_data_source.py@@ -1403,7 +1403,10 @@ class ExternalDataSourceCreateSerializer(serializers.Serializer):help_text="The source type (e.g. 'Postgres', 'Stripe').",)payload = serializers.DictField(- help_text="Connection credentials and a 'schemas' array. Keys depend on source_type.",+ help_text=(+ "Connection credentials. Keys depend on source_type. Add a 'schemas' array to pick "+ "which tables sync; omit it and every discovered table syncs with default settings."+ ),)prefix = serializers.CharField(max_length=100,@@ -2365,13 +2368,19 @@ class ExternalDataSourceViewSet(TeamAndOrgViewSetMixin, AccessControlViewSetMixidefault_source_catalog = source_config_dict.get("database")schema_label_by_name = {s.name: s.label for s in source_schemas}- payload_schemas = payload.get("schemas", None)- if not payload_schemas or not isinstance(payload_schemas, list):+ # Omitting `schemas` means "sync what you found", the same defaults `setup` builds. A+ # caller that wants to hand-pick tables still sends the array; one that just has+ # credentials no longer has to run schema discovery itself to write back what we already+ # know. Discovery ran above, so the defaults cost nothing extra here.+ payload_schemas = payload.get("schemas")+ if payload_schemas is not None and not isinstance(payload_schemas, list):new_source_model.delete()return Response(+ data={"message": "The 'schemas' field must be a list of the tables to sync."},status=status.HTTP_400_BAD_REQUEST,- data={"message": "Schemas not given"},)+ if not payload_schemas:+ payload_schemas = build_default_schemas(source_schemas)# Return 400 if we get any schema names that don't exist in our sourceif any(schema.get("name") not in schema_names for schema in payload_schemas):diff --git a/products/warehouse_sources/backend/tests/api/test_external_data_source.py b/products/warehouse_sources/backend/tests/api/test_external_data_source.pyindex 60fa3ce66a09..be16ea26c237 100644--- a/products/warehouse_sources/backend/tests/api/test_external_data_source.py+++ b/products/warehouse_sources/backend/tests/api/test_external_data_source.py@@ -397,7 +397,7 @@ class TestExternalDataSource(APIBaseTest):"products.warehouse_sources.backend.temporal.data_imports.sources.stripe.source.StripeSource.validate_credentials",return_value=(True, None),)- def test_create_external_data_source_delete_on_missing_schemas(self, _mock_validate):+ def test_create_external_data_source_delete_on_non_list_schemas(self, _mock_validate):response = self.client.post(f"/api/environments/{self.team.pk}/external_data_sources/",data={@@ -413,6 +413,28 @@ class TestExternalDataSource(APIBaseTest):assert response.status_code == 400assert ExternalDataSource.objects.count() == 0+ @parameterized.expand([("omitted", {}), ("empty_list", {"schemas": []})])+ @patch(+ "products.warehouse_sources.backend.temporal.data_imports.sources.stripe.source.StripeSource.validate_credentials",+ return_value=(True, None),+ )+ def test_create_external_data_source_defaults_schemas(self, _name, extra_payload, _mock_validate):+ response = self.client.post(+ f"/api/environments/{self.team.pk}/external_data_sources/",+ data={+ "source_type": "Stripe",+ "created_via": "web",+ "payload": {+ "auth_method": {"selection": "api_key", "stripe_secret_key": "sk_test_123"},+ **extra_payload,+ },+ },+ )++ assert response.status_code == 201+ source = ExternalDataSource.objects.get()+ assert source.schemas.filter(should_sync=True).exists()+@patch("products.warehouse_sources.backend.temporal.data_imports.sources.stripe.source.StripeSource.validate_credentials",return_value=(True, None),diff --git a/products/warehouse_sources/frontend/generated/api.schemas.ts b/products/warehouse_sources/frontend/generated/api.schemas.tsindex 6196892534e6..adc0985b4b54 100644--- a/products/warehouse_sources/frontend/generated/api.schemas.ts+++ b/products/warehouse_sources/frontend/generated/api.schemas.ts@@ -3156,7 +3156,7 @@ export interface PaginatedExternalDataSourceSerializersListApi {}/**- * Connection credentials and a 'schemas' array. Keys depend on source_type.+ * Connection credentials. Keys depend on source_type. Add a 'schemas' array to pick which tables sync; omit it and every discovered table syncs with default settings.*/export type ExternalDataSourceCreateApiPayload = { [key: string]: unknown }@@ -4475,7 +4475,7 @@ export interface ExternalDataSourceCreateApi {* * `Hootsuite` - Hootsuite* * `WisprFlow` - WisprFlow */source_type: ExternalDataSourceTypeEnumApi- /** Connection credentials and a 'schemas' array. Keys depend on source_type. */+ /** Connection credentials. Keys depend on source_type. Add a 'schemas' array to pick which tables sync; omit it and every discovered table syncs with default settings. */payload: ExternalDataSourceCreateApiPayload/*** Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported.diff --git a/products/warehouse_sources/mcp/tools.yaml b/products/warehouse_sources/mcp/tools.yamlindex 0767bde54bdf..d84df5d17388 100644--- a/products/warehouse_sources/mcp/tools.yaml+++ b/products/warehouse_sources/mcp/tools.yaml@@ -279,15 +279,16 @@ tools:idempotent: falsetitle: Create data warehouse source (advanced; prefer source setup)description: >- Low-level create for a data warehouse import source when you need to hand-pick tables and sync types. For- most cases prefer 'data-warehouse-source-setup', which validates credentials, discovers tables, applies- sensible sync defaults, and creates the source in one call. Use this advanced path only for fine-grained- control. The 'schemas' array is NOT a top-level argument — it goes INSIDE 'payload', alongside the- credential fields: payload = {<credential fields…>, "schemas": [...]}. Each schemas entry has: name,- should_sync (bool), sync_type (incremental/full_refresh/append), and optionally incremental_field,- incremental_field_type, and primary_key_columns. Build the entries from the rows returned by- 'external-data-sources-db-schema' first. Sources back queryable warehouse tables for revenue (Stripe), CRM- (Hubspot, Salesforce), support (Zendesk), and your own databases (Postgres, MySQL, BigQuery).+ Low-level create for a data warehouse import source when you need to hand-pick tables and sync types. If you+ only have credentials and want every table, call 'data-warehouse-source-setup' instead — one call, fewer+ ways to get it wrong. Use this path when the user asked for specific tables or sync types. The 'schemas'+ array is NOT a top-level argument — it goes INSIDE 'payload', alongside the credential fields: payload =+ {<credential fields…>, "schemas": [...]}. Each schemas entry has: name, should_sync (bool), sync_type+ (incremental/full_refresh/append), and optionally incremental_field, incremental_field_type, and+ primary_key_columns. Build the entries from the rows returned by 'external-data-sources-db-schema' first.+ Omit 'schemas' entirely and every discovered table syncs with default settings. Sources back queryable+ warehouse tables for revenue (Stripe), CRM (Hubspot, Salesforce), support (Zendesk), and your own databases+ (Postgres, MySQL, BigQuery).exclude_params:- client_secret- account_iddiff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 6ba5a9706151..82bae275018a 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -4139,7 +4139,7 @@}},"external-data-sources-create": {- "description": "Low-level create for a data warehouse import source when you need to hand-pick tables and sync types. For most cases prefer 'data-warehouse-source-setup', which validates credentials, discovers tables, applies sensible sync defaults, and creates the source in one call. Use this advanced path only for fine-grained control. The 'schemas' array is NOT a top-level argument — it goes INSIDE 'payload', alongside the credential fields: payload = {<credential fields…>, \"schemas\": [...]}. Each schemas entry has: name, should_sync (bool), sync_type (incremental/full_refresh/append), and optionally incremental_field, incremental_field_type, and primary_key_columns. Build the entries from the rows returned by 'external-data-sources-db-schema' first. Sources back queryable warehouse tables for revenue (Stripe), CRM (Hubspot, Salesforce), support (Zendesk), and your own databases (Postgres, MySQL, BigQuery).",+ "description": "Low-level create for a data warehouse import source when you need to hand-pick tables and sync types. If you only have credentials and want every table, call 'data-warehouse-source-setup' instead — one call, fewer ways to get it wrong. Use this path when the user asked for specific tables or sync types. The 'schemas' array is NOT a top-level argument — it goes INSIDE 'payload', alongside the credential fields: payload = {<credential fields…>, \"schemas\": [...]}. Each schemas entry has: name, should_sync (bool), sync_type (incremental/full_refresh/append), and optionally incremental_field, incremental_field_type, and primary_key_columns. Build the entries from the rows returned by 'external-data-sources-db-schema' first. Omit 'schemas' entirely and every discovered table syncs with default settings. Sources back queryable warehouse tables for revenue (Stripe), CRM (Hubspot, Salesforce), support (Zendesk), and your own databases (Postgres, MySQL, BigQuery).","category": "Warehouse sources","feature": "warehouse_sources","summary": "Create data warehouse source (advanced; prefer source setup)",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex cf13dd2a93b1..f9f1611d48fb 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -4224,7 +4224,7 @@}},"external-data-sources-create": {- "description": "Low-level create for a data warehouse import source when you need to hand-pick tables and sync types. For most cases prefer 'data-warehouse-source-setup', which validates credentials, discovers tables, applies sensible sync defaults, and creates the source in one call. Use this advanced path only for fine-grained control. The 'schemas' array is NOT a top-level argument — it goes INSIDE 'payload', alongside the credential fields: payload = {<credential fields…>, \"schemas\": [...]}. Each schemas entry has: name, should_sync (bool), sync_type (incremental/full_refresh/append), and optionally incremental_field, incremental_field_type, and primary_key_columns. Build the entries from the rows returned by 'external-data-sources-db-schema' first. Sources back queryable warehouse tables for revenue (Stripe), CRM (Hubspot, Salesforce), support (Zendesk), and your own databases (Postgres, MySQL, BigQuery).",+ "description": "Low-level create for a data warehouse import source when you need to hand-pick tables and sync types. If you only have credentials and want every table, call 'data-warehouse-source-setup' instead — one call, fewer ways to get it wrong. Use this path when the user asked for specific tables or sync types. The 'schemas' array is NOT a top-level argument — it goes INSIDE 'payload', alongside the credential fields: payload = {<credential fields…>, \"schemas\": [...]}. Each schemas entry has: name, should_sync (bool), sync_type (incremental/full_refresh/append), and optionally incremental_field, incremental_field_type, and primary_key_columns. Build the entries from the rows returned by 'external-data-sources-db-schema' first. Omit 'schemas' entirely and every discovered table syncs with default settings. Sources back queryable warehouse tables for revenue (Stripe), CRM (Hubspot, Salesforce), support (Zendesk), and your own databases (Postgres, MySQL, BigQuery).","category": "Warehouse sources","feature": "warehouse_sources","summary": "Create data warehouse source (advanced; prefer source setup)",diff --git a/services/mcp/schema/tool-inputs.json b/services/mcp/schema/tool-inputs.jsonindex 7ab77c0d0b40..77085df1f427 100644--- a/services/mcp/schema/tool-inputs.json+++ b/services/mcp/schema/tool-inputs.json@@ -390,7 +390,7 @@"type": "string"},"additionalProperties": {},- "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link."+ "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. That array is optional: omit it and every discovered table syncs with default settings. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link."},"ExternalDataSourceTypeSchema": {"type": "string",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 3a9317a8f05c..e309cb4c149f 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -34649,7 +34649,7 @@ export namespace Schemas {}/**- * Connection credentials and a 'schemas' array. Keys depend on source_type.+ * Connection credentials. Keys depend on source_type. Add a 'schemas' array to pick which tables sync; omit it and every discovered table syncs with default settings.*/export type ExternalDataSourceCreatePayload = { [key: string]: unknown };@@ -35968,7 +35968,7 @@ export namespace Schemas {* * `Hootsuite` - Hootsuite* * `WisprFlow` - WisprFlow */source_type: ExternalDataSourceTypeEnum;- /** Connection credentials and a 'schemas' array. Keys depend on source_type. */+ /** Connection credentials. Keys depend on source_type. Add a 'schemas' array to pick which tables sync; omit it and every discovered table syncs with default settings. */payload: ExternalDataSourceCreatePayload;/*** Prefix added to the table names PostHog creates in HogQL. Does not filter which tables are imported.diff --git a/services/mcp/src/generated/warehouse_sources/api.ts b/services/mcp/src/generated/warehouse_sources/api.tsindex 99cdcbabea50..839d2ff187e3 100644--- a/services/mcp/src/generated/warehouse_sources/api.ts+++ b/services/mcp/src/generated/warehouse_sources/api.ts@@ -1833,7 +1833,9 @@ export const ExternalDataSourcesCreateBody = /* @__PURE__ */ zod.object({),payload: zod.record(zod.string(), zod.unknown())- .describe("Connection credentials and a 'schemas' array. Keys depend on source_type."),+ .describe(+ "Connection credentials. Keys depend on source_type. Add a 'schemas' array to pick which tables sync; omit it and every discovered table syncs with default settings."+ ),prefix: zod.string().max(externalDataSourcesCreateBodyPrefixMax)diff --git a/services/mcp/src/schema/tool-inputs.ts b/services/mcp/src/schema/tool-inputs.tsindex b36b6f8b6325..5008d045810c 100644--- a/services/mcp/src/schema/tool-inputs.ts+++ b/services/mcp/src/schema/tool-inputs.ts@@ -47,7 +47,7 @@ export const ExternalDataJobsSchemasSchema = zexport const ExternalDataSourcePayloadSchema = z.record(z.string(), z.unknown()).describe(- 'Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type "Custom" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table \'schemas\' array (built from external-data-sources-db-schema) also goes in here, e.g. {"host": ..., "password": ..., "schemas": [{"name": "orders", "should_sync": true, "sync_type": "incremental", "incremental_field": "updated_at", "incremental_field_type": "datetime"}]}. Do not pass unresolved {"secretRef": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.'+ 'Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type "Custom" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table \'schemas\' array (built from external-data-sources-db-schema) also goes in here, e.g. {"host": ..., "password": ..., "schemas": [{"name": "orders", "should_sync": true, "sync_type": "incremental", "incremental_field": "updated_at", "incremental_field_type": "datetime"}]}. That array is optional: omit it and every discovered table syncs with default settings. Do not pass unresolved {"secretRef": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.')export const ExternalDataSourceTypeSchema = zdiff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.jsonindex 7a02788010e3..b68a523b43a5 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-create.json@@ -26,7 +26,7 @@},"payload": {"additionalProperties": {},- "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.",+ "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. That array is optional: omit it and every discovered table syncs with default settings. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.","propertyNames": {"type": "string"},diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-db-schema.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-db-schema.jsonindex f6cdf3c2ad98..15365d15f17f 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-db-schema.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-db-schema.json@@ -3,7 +3,7 @@"properties": {"payload": {"additionalProperties": {},- "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.",+ "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. That array is optional: omit it and every discovered table syncs with default settings. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.","propertyNames": {"type": "string"},diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-preview-resource.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-preview-resource.jsonindex cf94c9f12e74..670f24da9f0c 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-preview-resource.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/external-data-sources-preview-resource.json@@ -9,7 +9,7 @@},"payload": {"additionalProperties": {},- "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.",+ "description": "Connection credentials for the source. Keys depend on source_type. For database sources: host, port, database, user, password, schema. For SaaS sources: api_key or OAuth fields. For source_type \"Custom\" (a user-defined REST API): `manifest_json` (a stringified RESTAPIConfig describing client.base_url, auth, and resources) plus the credential for the auth type declared in the manifest — `auth_token` (bearer), `auth_api_key` (api_key), or `auth_password` (http_basic); keep secrets in these auth_* keys, never inline in manifest_json. Use external-data-sources-wizard (pass source_type) to see required fields per source type. For the advanced external-data-sources-create flow, the per-table 'schemas' array (built from external-data-sources-db-schema) also goes in here, e.g. {\"host\": ..., \"password\": ..., \"schemas\": [{\"name\": \"orders\", \"should_sync\": true, \"sync_type\": \"incremental\", \"incremental_field\": \"updated_at\", \"incremental_field_type\": \"datetime\"}]}. That array is optional: omit it and every discovered table syncs with default settings. Do not pass unresolved {\"secretRef\": ...} objects — resolve secrets to real values first, or use a credential_id from data-warehouse-source-connect-link.","propertyNames": {"type": "string"},