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.

fix(data-warehouse): trim column bloat from warehouse source list MCP tools (#65300)

Daniel RC36eb435df0ce
diff --git a/products/warehouse_sources/mcp/tools.yaml b/products/warehouse_sources/mcp/tools.yaml
index 2d42c250bcd0..0106171d4249 100644
--- a/products/warehouse_sources/mcp/tools.yaml
+++ b/products/warehouse_sources/mcp/tools.yaml
@@ -145,7 +145,13 @@ tools:
description: >
List all table schemas across all data warehouse sources. Each schema represents one table being synced from
an external source. Returns the schema name, sync status, sync frequency, incremental field configuration,
- and latest error. Use this to see which tables are actively syncing and their health.
+ 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.
+ response:
+ exclude:
+ - table.columns
+ - available_columns
external-data-schemas-logs-retrieve:
operation: external_data_schemas_logs_retrieve
enabled: false
@@ -355,7 +361,13 @@ tools:
description: >
List all configured data warehouse import sources in the project. Returns each source's type (Postgres,
Stripe, Hubspot, etc.), connection status, prefix, schemas, latest error, and last sync timestamp. Use this
- to discover what external data sources are connected.
+ to discover what external data sources are connected. Per-schema column definitions are omitted to keep the
+ payload small — to look up a single table's sync status by name use external-data-schemas-list with a
+ search, and to see a table's columns use external-data-schemas-retrieve.
+ response:
+ exclude:
+ - schemas.*.table.columns
+ - schemas.*.available_columns
external-data-sources-partial-update:
operation: external_data_sources_partial_update
enabled: true
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index b617009da1b9..e1f0f4aa5856 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -2992,7 +2992,7 @@
}
},
"external-data-schemas-list": {
- "description": "List all table schemas across all data warehouse sources. Each schema represents one table being synced from an external source. Returns the schema name, sync status, sync frequency, incremental field configuration, and latest error. Use this to see which tables are actively syncing and their health.",
+ "description": "List all table schemas across all data warehouse sources. Each schema represents one table being synced from an external source. 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.",
"category": "Warehouse sources",
"feature": "warehouse_sources",
"summary": "List data warehouse table schemas (imported tables)",
@@ -3146,7 +3146,7 @@
}
},
"external-data-sources-list": {
- "description": "List all configured data warehouse import sources in the project. Returns each source's type (Postgres, Stripe, Hubspot, etc.), connection status, prefix, schemas, latest error, and last sync timestamp. Use this to discover what external data sources are connected.",
+ "description": "List all configured data warehouse import sources in the project. Returns each source's type (Postgres, Stripe, Hubspot, etc.), connection status, prefix, schemas, latest error, and last sync timestamp. Use this to discover what external data sources are connected. Per-schema column definitions are omitted to keep the payload small — to look up a single table's sync status by name use external-data-schemas-list with a search, and to see a table's columns use external-data-schemas-retrieve.",
"category": "Warehouse sources",
"feature": "warehouse_sources",
"summary": "List data warehouse sources",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index 0a9413861169..2e532f5c8abd 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -3190,7 +3190,7 @@
}
},
"external-data-schemas-list": {
- "description": "List all table schemas across all data warehouse sources. Each schema represents one table being synced from an external source. Returns the schema name, sync status, sync frequency, incremental field configuration, and latest error. Use this to see which tables are actively syncing and their health.",
+ "description": "List all table schemas across all data warehouse sources. Each schema represents one table being synced from an external source. 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.",
"category": "Warehouse sources",
"feature": "warehouse_sources",
"summary": "List data warehouse table schemas (imported tables)",
@@ -3372,7 +3372,7 @@
}
},
"external-data-sources-list": {
- "description": "List all configured data warehouse import sources in the project. Returns each source's type (Postgres, Stripe, Hubspot, etc.), connection status, prefix, schemas, latest error, and last sync timestamp. Use this to discover what external data sources are connected.",
+ "description": "List all configured data warehouse import sources in the project. Returns each source's type (Postgres, Stripe, Hubspot, etc.), connection status, prefix, schemas, latest error, and last sync timestamp. Use this to discover what external data sources are connected. Per-schema column definitions are omitted to keep the payload small — to look up a single table's sync status by name use external-data-schemas-list with a search, and to see a table's columns use external-data-schemas-retrieve.",
"category": "Warehouse sources",
"feature": "warehouse_sources",
"summary": "List data warehouse sources",
diff --git a/services/mcp/src/tools/generated/warehouse_sources.ts b/services/mcp/src/tools/generated/warehouse_sources.ts
index 1180f40223b7..6900b1f4df1c 100644
--- a/services/mcp/src/tools/generated/warehouse_sources.ts
+++ b/services/mcp/src/tools/generated/warehouse_sources.ts
@@ -39,7 +39,7 @@ import {
ExternalDataSourcesWebhookInfoRetrieveParams,
} from '@/generated/warehouse_sources/api'
import { ExternalDataSourcePayloadSchema, ExternalDataSourceTypeSchema } from '@/schema/tool-inputs'
-import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
+import { withPostHogUrl, omitResponseFields, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
const DataWarehouseSourceConnectLinkSchema = ExternalDataSourcesConnectLinkRetrieveQueryParams.extend({
@@ -262,7 +262,13 @@ const externalDataSchemasList = (): ToolBase<
search: params.search,
},
})
- return await withPostHogUrl(context, result, '/data-management/sources')
+ const filtered = {
+ ...result,
+ results: (result.results ?? []).map((item: any) =>
+ omitResponseFields(item, ['table.columns', 'available_columns'])
+ ),
+ } as typeof result
+ return await withPostHogUrl(context, filtered, '/data-management/sources')
},
})
@@ -653,7 +659,13 @@ const externalDataSourcesList = (): ToolBase<
search: params.search,
},
})
- return await withPostHogUrl(context, result, '/data-management/sources')
+ const filtered = {
+ ...result,
+ results: (result.results ?? []).map((item: any) =>
+ omitResponseFields(item, ['schemas.*.table.columns', 'schemas.*.available_columns'])
+ ),
+ } as typeof result
+ return await withPostHogUrl(context, filtered, '/data-management/sources')
},
})