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.

35.3 KB
Raw Blame
# MCP tool definitions. Tools are opt-in: an operation is exposed only when it has an entry here.
# List operations without an entry: pnpm --filter=@posthog/mcp run scaffold-yaml -- --candidates --product warehouse_sources
# Add one: pnpm --filter=@posthog/mcp run scaffold-yaml -- --add <operationId> --product warehouse_sources
# To keep an operation off on purpose, set enabled: false and give a disabled_reason.
category: Warehouse sources
feature: warehouse_sources
url_prefix: /data-management/sources
ui_apps: {}
tools:
    data-warehouse-source-connect-link:
        operation: external_data_sources_connect_link_retrieve
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get a secure connect link for a source
        description: >
            Return a secure browser link to connect a data warehouse source WITHOUT the user pasting secrets into the
            chat. The link opens a minimal page rendering the source's full connection form — the user authorizes via
            OAuth or enters credentials there, whichever the source offers — and the page stores the connection details
            encrypted and temporarily; it does NOT create the source. This is the preferred, secure way to collect
            credentials: share the returned connect_url with the user, wait for them to confirm they're done, then find
            the stored credential via 'data-warehouse-stored-credentials-list' (filter by source_type, newest first) and
            call 'data-warehouse-source-setup' with {'credential_id': '<uuid>'} in the payload. Stored credentials are
            single-use, expire after 24 hours, and are only visible to the PostHog user who entered them — the page must
            be filled by the same user this session authenticates as. Never ask the user to paste raw database
            passwords, API keys, or OAuth tokens into the chat.
        param_overrides:
            source_type:
                input_schema: ExternalDataSourceTypeSchema
    data-warehouse-source-setup:
        operation: external_data_sources_setup_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Set up a data warehouse source (one step)
        description: >
            Reach for this the moment a user wants to analyze data PostHog doesn't store — Stripe revenue, Hubspot or
            Salesforce CRM, Zendesk tickets, Shopify orders, their own database, or files in an Amazon S3, Google Cloud
            Storage, Azure Blob, or Cloudflare R2 bucket. Use source_type AmazonS3, GoogleCloudStorage, AzureBlob, or
            CloudflareR2 for bucket files. For a local file, ask the user to upload it in the PostHog app. That flow
            creates a FileUpload source; no MCP tool uploads files. Connect an external data source and start importing
            it into queryable warehouse tables in a single call. Validates credentials, discovers all available tables,
            enables them with sensible sync defaults (incremental where supported to keep ongoing cost low), and creates
            the source. No 'schemas' array is required. Bucket sources use full_refresh by default. For webhook-capable
            sources (e.g. Stripe), a webhook is auto-registered after creation: check the 'webhook' key in the response
            — on success webhook-capable tables sync in real time (including webhook-only tables like Stripe Discount);
            on failure (e.g. the API key can't create webhooks) tables keep the polling defaults and webhook-only tables
            stay disabled. If 'webhook.pending_inputs' is non-empty, ask the user for those values and submit them via
            'external-data-sources-update-webhook-inputs-create'. Use this for revenue (Stripe), CRM (Hubspot,
            Salesforce), support tickets (Zendesk), e-commerce (Shopify), your own databases (Postgres, MySQL, BigQuery,
            Snowflake), and bucket files (AmazonS3, GoogleCloudStorage, AzureBlob, CloudflareR2). Discover required
            credential fields per source_type with 'external-data-sources-wizard'. Prefer references over raw secrets in
            the payload: pass {'credential_id': '<uuid>'} referencing the connection details the user stored via the
            'data-warehouse-source-connect-link' page (discover ids with 'data-warehouse-stored-credentials-list');
            stored credentials are deleted once the source is created. For an already-connected OAuth integration you
            can instead pass its integration id key (e.g. {'hubspot_integration_id': 123}). NOTE: this enables EVERY
            discovered table — ideal for small fixed schemas (Stripe, Zendesk) but on a large production database (a
            Postgres/MySQL/BigQuery/Snowflake with many tables) it syncs them all, which can be costly and noisy. When
            the user wants only specific tables, or non-default sync types per table, use 'external-data-sources-create'
            instead.
        exclude_params:
            - client_secret
            - account_id
        param_overrides:
            source_type:
                input_schema: ExternalDataSourceTypeSchema
    data-warehouse-stored-credentials-list:
        operation: external_data_sources_stored_credentials_list
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        list: true
        title: List stored source credentials awaiting setup
        description: >
            List credentials the authenticated user stored via the 'data-warehouse-source-connect-link' page that
            haven't been consumed yet. Only credentials this user created are visible — a teammate's stored credentials
            cannot be listed or consumed. Returns metadata only (credential_id, source_type, created_at, expires_at) —
            never the secrets themselves. Newest first; filter by source_type. After the user confirms they've finished
            the connect page, take the newest credential_id for the source type and call 'data-warehouse-source-setup'
            with {'credential_id': '<uuid>'} in the payload. Stored credentials are single-use — they are deleted as
            soon as setup consumes them — and expire after 24 hours if never used.
    external-data-schemas-cancel:
        operation: external_data_schemas_cancel_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Cancel running sync
        description: >
            Cancel a currently running sync job for a specific table schema. If no sync is running, returns an error.
            Use 'external-data-schemas-list' to check which schemas have status 'Running' before calling this.
    external-data-schemas-delete-data:
        operation: external_data_schemas_delete_data_destroy
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Delete synced table data
        description: >
            Delete the synced table data from PostHog but keep the schema entry. This also sets should_sync to false and
            pauses the schedule, so the next scheduled run does not rebuild the table. To sync the table again, set
            should_sync to true with 'external-data-schemas-partial-update', then call 'external-data-schemas-reload'.
            To clear stale or corrupt data and keep syncing on, use 'external-data-schemas-resync' instead.
    external-data-schemas-destinations-retrieve:
        operation: external_data_schemas_destinations_retrieve
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get a table's destinations
        description: >
            Read one table's destination override. `inherits_from_source` tells you whether the table follows its
            source; `effective_destination_ids` is where it actually syncs once inheritance is resolved.
        feature_flag: warehouse-multi-destination
    external-data-schemas-incremental-fields-create:
        operation: external_data_schemas_incremental_fields_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Refresh candidate incremental fields for a schema
        description: >
            Re-inspect the source for a single table schema and return the currently available incremental fields,
            detected primary keys, column list, and which sync methods (incremental/append/cdc/webhook) are available.
            Use this when the source schema has changed, an incremental field has been dropped, or the user wants to
            switch to a different incremental_field/sync_type on an existing schema. The operation_id is
            external_data_schemas_incremental_fields_create but semantically this is a read-only refresh.
    external-data-schemas-list:
        operation: external_data_schemas_list
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        list: true
        title: List data warehouse table schemas (imported tables)
        description: >
            List all table schemas across all data warehouse sources. Each schema represents one table linked to an
            external source. A migrated table with pending_self_managed_table=true and should_sync=false still reads its
            original bucket. Its first sync imports the table. Read the syncing-migrated-self-managed-tables skill
            before you turn syncing on. Returns the schema name, sync status, sync frequency, incremental field
            configuration, last_synced_at, and latest error. Use this to see which tables are actively syncing and their
            health. To check one table's freshness, pass `search` with the table/schema name to narrow to that schema.
            Column definitions are omitted here — use external-data-schemas-retrieve for a single schema's columns. When
            a table stopped syncing, check `incremental_sync_blocked`: it names why the last run could not merge on the
            table's primary key, and the table is disabled until that is resolved. A retry with nothing changed fails
            the same way; a later run that succeeds, or fails for another reason, clears it. That field's description
            lists the resolutions, which are applied with 'external-data-schemas-partial-update'.
        response:
            exclude:
                - table.columns
                - available_columns
    external-data-schemas-partial-update:
        operation: external_data_schemas_partial_update
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Update data warehouse table schema sync config
        description: "Update one table schema's sync configuration: enable/disable syncing (should_sync), sync_type
            (incremental, full_refresh, append, webhook, cdc, xmin), sync frequency and UTC time of day, scheduled full
            refresh interval and UTC time of day (full_refresh_interval_days, full_refresh_time_of_day), incremental
            field (plus type and lookback window), primary key columns, CDC table mode, column selection
            (enabled_columns), column masking (masked_columns), row filters, and vendor API version. Changes take effect
            on the next sync, not retroactively, except a masked_columns change, which starts a full resync of the
            table. Before changing incremental_field or sync_type, call
            'external-data-schemas-incremental-fields-create' to see which fields and sync methods the source actually
            supports; before switching to cdc, validate with 'external-data-sources-check-cdc-prerequisites-create'. To
            run a sync immediately after reconfiguring, use 'external-data-schemas-reload'. This is also how a table
            reported by `incremental_sync_blocked` is resolved: send primary_key_columns, or a different sync_type, or
            should_sync=true to retry a table fixed at the source. For `duplicate_primary_key`, a different key is
            refused once data has synced, because rows already merged under the old key would repeat; delete the synced
            data first with 'external-data-schemas-delete-data', or fix the duplicates at the source and retry. That
            field reports the last run's failure, so it clears once a run succeeds rather than when the update lands."
    external-data-schemas-reload:
        operation: external_data_schemas_reload_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Trigger sync for a table schema
        description: >
            Trigger a sync for a single table schema using its configured sync method (incremental, full refresh,
            append, or CDC). Use this to manually sync a specific table without triggering all tables in the source.
    external-data-schemas-resync:
        operation: external_data_schemas_resync_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Resync table schema from scratch
        description: >
            Trigger a full resync for a table schema, discarding all previously synced data and re-importing from the
            source. This cancels any running sync first, then resets the pipeline state. Use this when data is corrupt
            or out of sync. To re-import on a recurring schedule, for example to remove rows deleted at the source from
            an incremental table, set full_refresh_interval_days with 'external-data-schemas-partial-update' instead of
            calling this repeatedly.
    external-data-schemas-retrieve:
        operation: external_data_schemas_retrieve
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get data warehouse table schema
        description: >
            Get a single table schema by ID. Returns full details including sync status, sync frequency, incremental
            field, primary key columns, latest error, `incremental_sync_blocked`, and the associated source and table
            metadata. Read `incremental_sync_blocked` before diagnosing a table that stopped syncing: it names why the
            last run could not merge on the primary key, and its description lists the resolutions.
    external-data-sources-bulk-update-schemas:
        operation: external_data_sources_bulk_update_schemas_partial_update
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Update many table schemas in one request
        description: >
            Apply sync configuration to several of a source's table schemas at once: enable or disable syncing
            (should_sync), sync_type, sync frequency and UTC time of day, scheduled full refresh interval and UTC time
            of day (full_refresh_interval_days, full_refresh_time_of_day), incremental field, and primary key columns.
            Each entry needs the schema id plus the fields to change. Prefer this over looping
            'external-data-schemas-partial-update' when reconfiguring more than a couple of tables of the same source,
            such as moving every table that cannot sync incrementally onto full_refresh. Every entry is validated before
            anything is written, and a schema that fails is reported by name while the rest of the batch is saved.
            Changes take effect on the next sync, not retroactively.
    external-data-sources-check-cdc-prerequisites-create:
        operation: external_data_sources_check_cdc_prerequisites_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Check Postgres CDC prerequisites
        description: >
            Validate that a live Postgres database meets Change Data Capture prerequisites — logical replication enabled
            (wal_level=logical), replication slot available, publication present, and required permissions.
            Postgres-only. Returns {valid, errors[]}. Use this before configuring a schema with sync_type=cdc, or to
            diagnose why an existing CDC sync has started failing.
        param_overrides:
            source_type:
                input_schema: ExternalDataSourceTypeSchema
    external-data-sources-connections-list:
        operation: external_data_sources_connections_list
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        list: true
        title: List direct-query connections
        description: >
            List external data sources that can be used as a connectionId when running execute-sql against an external
            source: pure direct-query connections (Postgres, MySQL, Snowflake, Redshift) plus synced warehouse sources
            that have live queries enabled (direct_query_enabled). Returns a lightweight id, prefix, engine,
            source_type, access_method ('direct' for pure live-query sources, 'warehouse' for synced sources with live
            queries on), and supports_hogql for each; when supports_hogql is false, only raw SQL (sendRawQuery) works.
            Unlike external-data-sources-list, it does not include table schemas or sources that cannot be live-queried.
            Use this to discover valid connectionId values. To then see what a connection holds, run execute-sql with
            that connectionId and `SELECT table_name FROM system.information_schema.tables` (or
            `system.information_schema.columns` for one table's columns) — a connection's tables are absent from the
            default catalog, so this is the only way to list them.
    external-data-sources-create:
        operation: external_data_sources_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: 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. 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) or bucket files (AmazonS3, GoogleCloudStorage, AzureBlob, CloudflareR2). For a
            local file, direct the user to upload it in the PostHog app. The upload creates a FileUpload source.
        exclude_params:
            - client_secret
            - account_id
            - job_inputs
            - created_via
        inject_body:
            created_via: mcp
        param_overrides:
            source_type:
                input_schema: ExternalDataSourceTypeSchema
            payload:
                input_schema: ExternalDataSourcePayloadSchema
    external-data-sources-create-webhook-create:
        operation: external_data_sources_create_webhook_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Create and register a webhook for a source
        description: >
            For sources that support real-time webhook ingestion (currently Stripe), create the HogFunction handler and
            register the webhook URL with the external service using the source's stored credentials. Requires at least
            one schema on the source with sync_type='webhook' and should_sync=true. Returns the webhook_url, success
            flag, and any error. NOT idempotent — each successful call registers a new endpoint on the external service,
            so retrying after a network error or calling twice can create duplicate webhook endpoints (e.g. duplicate
            Stripe webhook endpoints delivering the same events twice). Always check webhook-info-retrieve first and
            only re-call if `exists: false`. For Stripe the signing_secret is auto-captured from the Stripe API response
            and stored securely; if auto-registration fails (e.g. the API key lacks webhook permissions), the user must
            create the webhook manually in Stripe and submit the signing_secret via update-webhook-inputs.
    external-data-sources-delete-webhook-create:
        operation: external_data_sources_delete_webhook_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Delete a source's webhook
        description: >
            Unregister the webhook with the external service and delete the PostHog HogFunction that was handling it.
            Any webhook-type schemas under the source will stop receiving real-time events. The source and its schemas
            are preserved — only the webhook is removed. After deletion, schemas can be switched to a polling sync_type
            (incremental/full_refresh) via external-data-schemas-partial-update, or a new webhook can be created with
            create-webhook.
    external-data-sources-destinations-retrieve:
        operation: external_data_sources_destinations_retrieve
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get a source's destinations
        description: >
            Read the destinations every table on this source syncs to, apart from tables with their own override. A
            source nobody configured destinations for writes to the PostHog warehouse by default and reports it here, so
            a list with only the PostHog warehouse can be a default or an explicit choice. An empty list means the
            project has no PostHog warehouse destination yet. Links to paused destinations are not listed.
        feature_flag: warehouse-multi-destination
    external-data-sources-destinations-update:
        operation: external_data_sources_destinations_partial_update
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Set a source's destinations
        description: >
            Replace the destinations every table on this source syncs to. Tables with their own destination override
            keep it. Pass the full list: a destination left out is detached from the source. A source can also hold a
            link to a paused destination that external-data-sources-destinations-retrieve does not list, and this call
            deletes that link for good. So do not call it while any destination in external-data-destinations-list has
            status paused. Otherwise, before external-data-destinations-add-sources, call this with the list that
            retrieve returned when it holds only the PostHog warehouse: that turns the default into an explicit link, so
            the source keeps updating its PostHog tables.
        param_overrides:
            destination_ids:
                description: The full list of destination ids for this source, at least one. A destination left out is detached.
        feature_flag: warehouse-multi-destination
    external-data-sources-destroy:
        operation: external_data_sources_destroy
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Delete data warehouse source
        description: >
            Delete a data warehouse source and all its table schemas, synced tables, and sync schedules. This is a soft
            delete. Any running syncs are cancelled first. This cannot be undone — the source must be recreated to
            resume syncing.
    external-data-sources-list:
        operation: external_data_sources_list
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        list: true
        title: List data warehouse sources
        description: >
            Check what external data is already connected before answering any revenue, billing, subscription, CRM,
            support-ticket, or product-database question — call this first so you JOIN against an existing source
            instead of telling the user the data isn't available. Lists every configured import source with its type
            (Postgres, Stripe, Hubspot, etc.), connection status, prefix, schemas, latest error, and last sync
            timestamp. If nothing relevant is connected, offer to set one up with 'data-warehouse-source-setup'. Each
            schema is summarized (name, label, status, sync type, last sync, error, table name, row count) — column
            definitions and full sync configuration (sync frequency, incremental field, primary keys, row filters,
            column selection) are on external-data-schemas-retrieve. To look up a single table's sync status by name use
            external-data-schemas-list with a search.
    external-data-sources-partial-update:
        operation: external_data_sources_partial_update
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Update data warehouse source
        description: >
            Update an existing data warehouse source's prefix (table name prefix in HogQL) or description. Cannot change
            the source_type or access_method after creation. Avoid sending new connection credentials inline here — to
            rotate or fix credentials, point the user at 'data-warehouse-source-connect-link' so they re-enter them
            securely in their browser rather than pasting secrets into the chat.
    external-data-sources-refresh-schemas:
        operation: external_data_sources_refresh_schemas_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Discover new tables in source
        description: >
            Fetch the latest table list from the remote database and create schema entries for any new tables found.
            This is a metadata refresh — it does NOT move or sync any data (use 'external-data-sources-reload' for
            that). Use this after adding new tables to a source database to make them available for syncing.
        exclude_params:
            - client_secret
            - account_id
            - prefix
            - description
            - job_inputs
    external-data-sources-reload:
        operation: external_data_sources_reload_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Trigger sync for a source
        description: >
            Trigger a sync for all enabled table schemas in the source using each table's configured sync method. If the
            source uses direct query mode, this refreshes the schema metadata instead.
        exclude_params:
            - client_secret
            - account_id
            - prefix
            - description
            - job_inputs
    external-data-sources-repair-cdc-create:
        operation: external_data_sources_repair_cdc_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Repair CDC on a source
        description: >
            Repair change data capture on a source whose replication slot or publication was lost — use when
            'external-data-sources-cdc-status-retrieve' shows slot_exists=false or publication_exists=false, or the
            source reports a CDC error about a missing slot. Recreates the replication resources from the stored CDC
            config, resets every active CDC schema to a fresh snapshot (a full re-sync — changes made while the slot was
            gone cannot be recovered), and resumes the paused sync schedules. Refuses with a 400 if CDC looks healthy
            (both slot and publication exist) so it cannot accidentally force a re-sync, and with a 409 if a repair is
            already running. Safe to retry after a failure. Returns {success, schemas_reset}.
    external-data-sources-retrieve:
        operation: external_data_sources_retrieve
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get data warehouse source
        description: >
            Get a single data warehouse source by ID. Returns full details including source type, connection status,
            prefix, all table schemas with their sync statuses, latest error, and last sync timestamp. Per-schema column
            definitions are omitted to keep the payload small — use external-data-schemas-retrieve for a single table's
            columns.
        response:
            exclude:
                - schemas.*.table.columns
                - schemas.*.available_columns
    external-data-sources-update-webhook-inputs-create:
        operation: external_data_sources_update_webhook_inputs_create
        enabled: true
        scopes:
            - external_data_source:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Update webhook inputs (signing secret, etc.)
        description: >
            Update the webhook-specific inputs on an already-created webhook — for example when a signing secret has
            been rotated on the source side, or when the webhook was registered manually and the signing_secret needs to
            be supplied. Only accepts keys defined in the source type's webhookFields (e.g. Stripe's signing_secret).
            Fails if no webhook has been created for this source yet — call create-webhook first.
    external-data-sources-webhook-info-retrieve:
        operation: external_data_sources_webhook_info_retrieve
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get webhook status for a source
        description: >
            Return webhook state for a source: supports_webhooks (is this source type webhook-capable), exists (has a
            webhook been created), webhook_url (the PostHog endpoint the external service should POST to),
            schema_mapping (external event type → PostHog schema id), and external_status (what the remote service
            reports about the webhook — enabled_events, status, created_at, error). Use this to check whether a webhook
            is healthy and whether the external registration is still valid.
    external-data-sources-wizard:
        operation: external_data_sources_wizard_retrieve
        enabled: true
        scopes:
            - external_data_source:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List data warehouse source types you can import
        description: >
            Use this whenever the user needs data PostHog doesn't capture natively — revenue and payments (Stripe,
            Chargebee), CRM contacts and deals (Hubspot, Salesforce), support tickets (Zendesk), e-commerce orders
            (Shopify), ad spend, their own database (Postgres, MySQL, BigQuery, Snowflake), or files in an Amazon S3,
            Google Cloud Storage, Azure Blob, or Cloudflare R2 bucket. Use it when a HogQL query fails because the table
            doesn't exist yet. Importing turns that data into queryable warehouse tables you can JOIN against product
            events. Returns the configuration metadata for every supported source type: the required fields (host, port,
            database, credentials, etc.), field types, and OAuth flows, so you know what a connection needs. ALWAYS pass
            'source_type' with the specific kind(s) you need (comma-separated, e.g. 'Postgres,Stripe') — the unfiltered
            response describes every source and is very large (hundreds of KB). Only omit 'source_type' if you genuinely
            need to enumerate every available type — and when enumerating, pass fields: ['*.name', '*.caption'] to skip
            the large per-source field definitions. To actually connect a bucket source, use source_type AmazonS3,
            GoogleCloudStorage, AzureBlob, or CloudflareR2 with 'data-warehouse-source-setup'. For a local file, direct
            the user to upload it in the PostHog app. That flow creates a FileUpload source; no MCP tool uploads files.
        response:
            include:
                - '*.name'
                - '*.caption'
                - '*.docsUrl'
                - '*.featured'
                - '*.unreleasedSource'
                - '*.fields'
            selectable: true