: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
feat(mcp-analytics): add a protocol revision breakdown query (#106949)
Lucas Fariaeb8415f6288e
diff --git a/.github/new-events-schema-targets.txt b/.github/new-events-schema-targets.txtindex f4b250e59cd3..e170cc8abbf9 100644--- a/.github/new-events-schema-targets.txt+++ b/.github/new-events-schema-targets.txt@@ -32,6 +32,7 @@ products/mcp_analytics/backend/tests/test_dashboard_series.pyproducts/mcp_analytics/backend/tests/test_harness_breakdown.pyproducts/mcp_analytics/backend/tests/test_missing_capabilities.pyproducts/mcp_analytics/backend/tests/test_model_breakdown.py+products/mcp_analytics/backend/tests/test_protocol_version_breakdown.pyproducts/mcp_analytics/backend/tests/test_tool_quality_tables.pyproducts/mcp_analytics/backend/tests/test_tool_tables.pyproducts/product_analytics/backend/hogql_queriesdiff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.jsonindex 5792591c119e..72bfe3079d37 100644--- a/frontend/src/queries/schema.json+++ b/frontend/src/queries/schema.json@@ -1799,6 +1799,9 @@{"$ref": "#/definitions/MCPModelBreakdownQuery"},+ {+ "$ref": "#/definitions/MCPProtocolVersionBreakdownQuery"+ },{"$ref": "#/definitions/MCPToolTopUsersQuery"},@@ -10382,6 +10385,110 @@],"type": "object"},+ "CachedMCPProtocolVersionBreakdownQueryResponse": {+ "additionalProperties": false,+ "properties": {+ "cache_key": {+ "type": "string"+ },+ "cache_target_age": {+ "format": "date-time",+ "type": "string"+ },+ "calculation_trigger": {+ "description": "What triggered the calculation of the query, leave empty if user/immediate",+ "type": "string"+ },+ "error": {+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",+ "type": "string"+ },+ "hogql": {+ "description": "Generated HogQL query.",+ "type": "string"+ },+ "is_cached": {+ "type": "boolean"+ },+ "last_refresh": {+ "format": "date-time",+ "type": "string"+ },+ "modifiers": {+ "$ref": "#/definitions/HogQLQueryModifiers",+ "description": "Modifiers used when performing the query"+ },+ "next_allowed_client_refresh": {+ "format": "date-time",+ "type": "string"+ },+ "query_metadata": {+ "type": "object"+ },+ "query_scan": {+ "$ref": "#/definitions/QueryScanSummary",+ "description": "The rows and time of the run that produced these results, with its analysis once it is stored."+ },+ "query_status": {+ "$ref": "#/definitions/QueryStatus",+ "description": "Query status indicates whether next to the provided data, a query is still running."+ },+ "resolved_compare_date_range": {+ "$ref": "#/definitions/ResolvedDateRangeResponse",+ "description": "The resolved previous/comparison period date range, when comparing against another period"+ },+ "resolved_date_range": {+ "$ref": "#/definitions/ResolvedDateRangeResponse",+ "description": "The date range used for the query"+ },+ "results": {+ "items": {+ "$ref": "#/definitions/MCPProtocolVersionBreakdownItem"+ },+ "type": "array"+ },+ "timezone": {+ "type": "string"+ },+ "timings": {+ "description": "Measured timings for different parts of the query generation process",+ "items": {+ "$ref": "#/definitions/QueryTiming"+ },+ "type": "array"+ },+ "used_data_warehouse_sources": {+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",+ "items": {+ "$ref": "#/definitions/DataWarehouseSourceUsage"+ },+ "type": "array"+ },+ "warnings": {+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",+ "items": {+ "anyOf": [+ {+ "$ref": "#/definitions/DataWarehouseSyncWarning"+ },+ {+ "$ref": "#/definitions/AccessControlFilterWarning"+ }+ ]+ },+ "type": "array"+ }+ },+ "required": [+ "cache_key",+ "is_cached",+ "last_refresh",+ "next_allowed_client_refresh",+ "results",+ "timezone"+ ],+ "type": "object"+ },"CachedMCPToolCallBreakdownQueryResponse": {"additionalProperties": false,"properties": {@@ -32192,6 +32299,127 @@"required": ["results"],"type": "object"},+ "MCPProtocolVersionBreakdownItem": {+ "additionalProperties": false,+ "description": "One MCP protocol revision's share of tool calls.",+ "properties": {+ "is_current": {+ "description": "On the stateless 2026-07-28 revision or later, or the rolling draft.",+ "type": "boolean"+ },+ "protocol_version": {+ "type": "string"+ },+ "total_calls": {+ "$ref": "#/definitions/integer"+ }+ },+ "required": ["protocol_version", "is_current", "total_calls"],+ "type": "object"+ },+ "MCPProtocolVersionBreakdownQuery": {+ "additionalProperties": false,+ "description": "MCP tool-call activity grouped by negotiated protocol revision.",+ "properties": {+ "dateRange": {+ "$ref": "#/definitions/DateRange"+ },+ "filterTestAccounts": {+ "type": "boolean"+ },+ "kind": {+ "const": "MCPProtocolVersionBreakdownQuery",+ "type": "string"+ },+ "modifiers": {+ "$ref": "#/definitions/HogQLQueryModifiers",+ "description": "Modifiers used when performing the query"+ },+ "properties": {+ "items": {+ "$ref": "#/definitions/MCPAnalyticsPropertyFilter"+ },+ "type": "array"+ },+ "response": {+ "$ref": "#/definitions/MCPProtocolVersionBreakdownQueryResponse"+ },+ "tags": {+ "$ref": "#/definitions/QueryLogTags"+ },+ "version": {+ "description": "version of the node, used for schema migrations",+ "type": "number"+ }+ },+ "required": ["kind"],+ "type": "object"+ },+ "MCPProtocolVersionBreakdownQueryResponse": {+ "additionalProperties": false,+ "properties": {+ "error": {+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",+ "type": "string"+ },+ "hogql": {+ "description": "Generated HogQL query.",+ "type": "string"+ },+ "modifiers": {+ "$ref": "#/definitions/HogQLQueryModifiers",+ "description": "Modifiers used when performing the query"+ },+ "query_status": {+ "$ref": "#/definitions/QueryStatus",+ "description": "Query status indicates whether next to the provided data, a query is still running."+ },+ "resolved_compare_date_range": {+ "$ref": "#/definitions/ResolvedDateRangeResponse",+ "description": "The resolved previous/comparison period date range, when comparing against another period"+ },+ "resolved_date_range": {+ "$ref": "#/definitions/ResolvedDateRangeResponse",+ "description": "The date range used for the query"+ },+ "results": {+ "items": {+ "$ref": "#/definitions/MCPProtocolVersionBreakdownItem"+ },+ "type": "array"+ },+ "timings": {+ "description": "Measured timings for different parts of the query generation process",+ "items": {+ "$ref": "#/definitions/QueryTiming"+ },+ "type": "array"+ },+ "used_data_warehouse_sources": {+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",+ "items": {+ "$ref": "#/definitions/DataWarehouseSourceUsage"+ },+ "type": "array"+ },+ "warnings": {+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",+ "items": {+ "anyOf": [+ {+ "$ref": "#/definitions/DataWarehouseSyncWarning"+ },+ {+ "$ref": "#/definitions/AccessControlFilterWarning"+ }+ ]+ },+ "type": "array"+ }+ },+ "required": ["results"],+ "type": "object"+ },"MCPToolCallBreakdownItem": {"additionalProperties": false,"description": "One tool's call count within one interval bucket.",@@ -38796,6 +39024,7 @@"MCPToolCallsAndErrorsQuery","MCPHarnessBreakdownQuery","MCPModelBreakdownQuery",+ "MCPProtocolVersionBreakdownQuery","MCPToolTopUsersQuery","MCPToolFailuresQuery","MCPToolFailureOccurrencesQuery",@@ -48167,6 +48396,71 @@"required": ["results"],"type": "object"},+ {+ "additionalProperties": false,+ "properties": {+ "error": {+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",+ "type": "string"+ },+ "hogql": {+ "description": "Generated HogQL query.",+ "type": "string"+ },+ "modifiers": {+ "$ref": "#/definitions/HogQLQueryModifiers",+ "description": "Modifiers used when performing the query"+ },+ "query_status": {+ "$ref": "#/definitions/QueryStatus",+ "description": "Query status indicates whether next to the provided data, a query is still running."+ },+ "resolved_compare_date_range": {+ "$ref": "#/definitions/ResolvedDateRangeResponse",+ "description": "The resolved previous/comparison period date range, when comparing against another period"+ },+ "resolved_date_range": {+ "$ref": "#/definitions/ResolvedDateRangeResponse",+ "description": "The date range used for the query"+ },+ "results": {+ "items": {+ "$ref": "#/definitions/MCPProtocolVersionBreakdownItem"+ },+ "type": "array"+ },+ "timings": {+ "description": "Measured timings for different parts of the query generation process",+ "items": {+ "$ref": "#/definitions/QueryTiming"+ },+ "type": "array"+ },+ "used_data_warehouse_sources": {+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",+ "items": {+ "$ref": "#/definitions/DataWarehouseSourceUsage"+ },+ "type": "array"+ },+ "warnings": {+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",+ "items": {+ "anyOf": [+ {+ "$ref": "#/definitions/DataWarehouseSyncWarning"+ },+ {+ "$ref": "#/definitions/AccessControlFilterWarning"+ }+ ]+ },+ "type": "array"+ }+ },+ "required": ["results"],+ "type": "object"+ },{"additionalProperties": false,"properties": {@@ -49541,6 +49835,9 @@{"$ref": "#/definitions/MCPModelBreakdownQuery"},+ {+ "$ref": "#/definitions/MCPProtocolVersionBreakdownQuery"+ },{"$ref": "#/definitions/MCPToolTopUsersQuery"},diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.tsindex 16610fd764d2..e0a1a749d4ea 100644--- a/frontend/src/queries/schema/schema-general.ts+++ b/frontend/src/queries/schema/schema-general.ts@@ -202,6 +202,7 @@ export enum NodeKind {MCPToolCallsAndErrorsQuery = 'MCPToolCallsAndErrorsQuery',MCPHarnessBreakdownQuery = 'MCPHarnessBreakdownQuery',MCPModelBreakdownQuery = 'MCPModelBreakdownQuery',+ MCPProtocolVersionBreakdownQuery = 'MCPProtocolVersionBreakdownQuery',MCPToolTopUsersQuery = 'MCPToolTopUsersQuery',MCPToolFailuresQuery = 'MCPToolFailuresQuery',MCPToolFailureOccurrencesQuery = 'MCPToolFailureOccurrencesQuery',@@ -290,6 +291,7 @@ export type AnyDataNode =| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -425,6 +427,7 @@ export type QuerySchema =| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -3573,6 +3576,29 @@ export interface MCPModelBreakdownQuery extends DataNode<MCPModelBreakdownQueryRexport type CachedMCPModelBreakdownQueryResponse = CachedQueryResponse<MCPModelBreakdownQueryResponse>+/** One MCP protocol revision's share of tool calls. */+export interface MCPProtocolVersionBreakdownItem {+ protocol_version: string+ /** On the stateless 2026-07-28 revision or later, or the rolling draft. */+ is_current: boolean+ total_calls: integer+}++export interface MCPProtocolVersionBreakdownQueryResponse extends AnalyticsQueryResponseBase {+ results: MCPProtocolVersionBreakdownItem[]+}++/** MCP tool-call activity grouped by negotiated protocol revision. */+export interface MCPProtocolVersionBreakdownQuery extends DataNode<MCPProtocolVersionBreakdownQueryResponse> {+ kind: NodeKind.MCPProtocolVersionBreakdownQuery+ dateRange?: DateRange+ properties?: MCPAnalyticsPropertyFilter[]+ filterTestAccounts?: boolean+}++export type CachedMCPProtocolVersionBreakdownQueryResponse =+ CachedQueryResponse<MCPProtocolVersionBreakdownQueryResponse>+/** One row of the per-tool "Top users" table: a user and their activity on a tool. */export interface MCPToolTopUserItem {distinct_id: stringdiff --git a/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx b/frontend/src/scenes/saved-insights/insightTypesMetadata.tsxindex 552a0dab80b0..fa08f8cd733b 100644--- a/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx+++ b/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx@@ -640,6 +640,12 @@ export const QUERY_TYPES_METADATA: Record<NodeKind, InsightTypeMetadata> = {icon: IconPieChart,inMenu: false,},+ [NodeKind.MCPProtocolVersionBreakdownQuery]: {+ name: 'MCP protocol version breakdown',+ description: 'MCP tool-call activity grouped by negotiated protocol revision.',+ icon: IconPieChart,+ inMenu: false,+ },[NodeKind.MCPToolSampleIntentsQuery]: {name: 'MCP tool sample intents',description: 'Recent sampled intents for a single MCP tool.',diff --git a/frontend/src/taxonomy/core-filter-definitions-by-group.json b/frontend/src/taxonomy/core-filter-definitions-by-group.jsonindex 44dd71c6b061..8045dc2d56de 100644--- a/frontend/src/taxonomy/core-filter-definitions-by-group.json+++ b/frontend/src/taxonomy/core-filter-definitions-by-group.json@@ -2369,10 +2369,11 @@"label": "MCP project UUID"},"$mcp_protocol_version": {- "description": "The MCP protocol version negotiated between client and server during initialize.",+ "description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.","examples": ["2025-11-25",- "2025-06-18"+ "2025-06-18",+ "2026-07-28"],"label": "MCP protocol version"},@@ -4788,10 +4789,11 @@"label": "MCP project UUID"},"$mcp_protocol_version": {- "description": "The MCP protocol version negotiated between client and server during initialize.",+ "description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.","examples": ["2025-11-25",- "2025-06-18"+ "2025-06-18",+ "2026-07-28"],"label": "MCP protocol version"},@@ -7691,10 +7693,11 @@"label": "MCP project UUID"},"$mcp_protocol_version": {- "description": "The MCP protocol version negotiated between client and server during initialize.",+ "description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.","examples": ["2025-11-25",- "2025-06-18"+ "2025-06-18",+ "2026-07-28"],"label": "MCP protocol version"},diff --git a/posthog/api/query.py b/posthog/api/query.pyindex 8717c86528f4..a20913e7e45c 100644--- a/posthog/api/query.py+++ b/posthog/api/query.py@@ -200,7 +200,10 @@ _QUERY_KIND_SCOPES: dict[str, list[str]] = {"MetricsHistogramQuery": ["metrics:read"],# Both scopes listed: this result replaces the view's default query:read# rather than adding to it, and a token must hold every listed scope.+ "MCPHarnessBreakdownQuery": ["query:read", "mcp_analytics:read"],"MCPMissingCapabilitiesQuery": ["query:read", "mcp_analytics:read"],+ "MCPModelBreakdownQuery": ["query:read", "mcp_analytics:read"],+ "MCPProtocolVersionBreakdownQuery": ["query:read", "mcp_analytics:read"],"MCPToolFailureOccurrencesQuery": ["query:read", "mcp_analytics:read"],"MCPToolCallsAndErrorsQuery": ["query:read", "mcp_analytics:read"],"MCPToolCallBreakdownQuery": ["query:read", "mcp_analytics:read"],diff --git a/posthog/clickhouse/query_tagging.py b/posthog/clickhouse/query_tagging.pyindex f0ee4234bb9e..c3443b1f7ed9 100644--- a/posthog/clickhouse/query_tagging.py+++ b/posthog/clickhouse/query_tagging.py@@ -289,6 +289,7 @@ def kind_fallback_tags(kind: NodeKind) -> FallbackTags | None:case (NodeKind.MCP_HARNESS_BREAKDOWN_QUERY| NodeKind.MCP_MODEL_BREAKDOWN_QUERY+ | NodeKind.MCP_PROTOCOL_VERSION_BREAKDOWN_QUERY| NodeKind.MCP_TOOL_CALL_BREAKDOWN_QUERY| NodeKind.MCP_TOOL_CALLS_AND_ERRORS_QUERY| NodeKind.MCP_TOOL_TOP_USERS_QUERYdiff --git a/posthog/clickhouse/test/test_query_tagging.py b/posthog/clickhouse/test/test_query_tagging.pyindex eb57b6fc0454..30ef312dc1c8 100644--- a/posthog/clickhouse/test/test_query_tagging.py+++ b/posthog/clickhouse/test/test_query_tagging.py@@ -590,7 +590,9 @@ class TestAddFallbackQueryTags(BaseTest):assert tags.product == Product.PRODUCT_ANALYTICSassert tags.feature is None- @parameterized.expand([("MCPMissingCapabilitiesQuery",), ("MCPModelBreakdownQuery",)])+ @parameterized.expand(+ [("MCPMissingCapabilitiesQuery",), ("MCPModelBreakdownQuery",), ("MCPProtocolVersionBreakdownQuery",)]+ )def test_mcp_analytics_kind_attributes_to_mcp_analytics(self, query_type: str) -> None:tags = QueryTags(query_type=query_type)add_fallback_query_tags(tags)diff --git a/posthog/hogql_queries/query_runner.py b/posthog/hogql_queries/query_runner.pyindex 4f5543fb4b0c..437af2ebd71e 100644--- a/posthog/hogql_queries/query_runner.py+++ b/posthog/hogql_queries/query_runner.py@@ -72,6 +72,7 @@ from posthog.schema import (MCPHarnessBreakdownQuery,MCPMissingCapabilitiesQuery,MCPModelBreakdownQuery,+ MCPProtocolVersionBreakdownQuery,MCPToolCallBreakdownQuery,MCPToolCallsAndErrorsQuery,MCPToolCategoriesQuery,@@ -587,6 +588,7 @@ RunnableQueryNode = Union[MetricsQuery,MCPHarnessBreakdownQuery,MCPModelBreakdownQuery,+ MCPProtocolVersionBreakdownQuery,MCPToolCallBreakdownQuery,MCPToolCallsAndErrorsQuery,MCPToolTopUsersQuery,@@ -1306,6 +1308,17 @@ def get_query_runner(modifiers=modifiers,user=user,)+ if kind == "MCPProtocolVersionBreakdownQuery":+ from products.mcp_analytics.backend.facade.queries import MCPProtocolVersionBreakdownQueryRunner++ return MCPProtocolVersionBreakdownQueryRunner(+ query=cast(MCPProtocolVersionBreakdownQuery | dict[str, Any], query),+ team=team,+ timings=timings,+ limit_context=limit_context,+ modifiers=modifiers,+ user=user,+ )if kind == "MCPMissingCapabilitiesQuery":from products.mcp_analytics.backend.facade.queries import MCPMissingCapabilitiesQueryRunnerdiff --git a/posthog/schema.py b/posthog/schema.pyindex d5eac74e50ec..d00f8dbcd502 100644--- a/posthog/schema.py+++ b/posthog/schema.py@@ -6007,6 +6007,18 @@ class MCPModelBreakdownItem(BaseModel):total_calls: int+class MCPProtocolVersionBreakdownItem(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ is_current: bool = Field(+ ...,+ description=("On the stateless 2026-07-28 revision or later, or the rolling draft."),+ )+ protocol_version: str+ total_calls: int++class MCPToolCallBreakdownItem(BaseModel):model_config = ConfigDict(extra="forbid",@@ -12523,6 +12535,68 @@ class CachedMCPModelBreakdownQueryResponse(BaseModel):)+class CachedMCPProtocolVersionBreakdownQueryResponse(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ cache_key: str+ cache_target_age: AwareDatetime | None = None+ calculation_trigger: str | None = Field(+ default=None,+ description=("What triggered the calculation of the query, leave empty if user/immediate"),+ )+ error: str | None = Field(+ default=None,+ description=(+ "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise."+ ),+ )+ hogql: str | None = Field(default=None, description="Generated HogQL query.")+ is_cached: bool+ last_refresh: AwareDatetime+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")+ next_allowed_client_refresh: AwareDatetime+ query_metadata: dict[str, Any] | None = None+ query_scan: QueryScanSummary | None = Field(+ default=None,+ description=("The rows and time of the run that produced these results, with its analysis once it is stored."),+ )+ query_status: QueryStatus | None = Field(+ default=None,+ description=("Query status indicates whether next to the provided data, a query is still running."),+ )+ resolved_compare_date_range: ResolvedDateRangeResponse | None = Field(+ default=None,+ description=("The resolved previous/comparison period date range, when comparing against another period"),+ )+ resolved_date_range: ResolvedDateRangeResponse | None = Field(+ default=None, description="The date range used for the query"+ )+ results: list[MCPProtocolVersionBreakdownItem]+ timezone: str+ timings: list[QueryTiming] | None = Field(+ default=None,+ description=("Measured timings for different parts of the query generation process"),+ )+ used_data_warehouse_sources: list[DataWarehouseSourceUsage] | None = Field(+ default=None,+ description=("Connector-synced data warehouse sources referenced by this query, if any."),+ )+ warnings: list[DataWarehouseSyncWarning | AccessControlFilterWarning] | None = Field(+ default=None,+ description=(+ "Warnings about data warehouse sources referenced by the query whose"+ " latest sync failed, is paused, hit a billing limit, or is otherwise"+ " stale. Results may not reflect current source data. Accumulated"+ " across every HogQL execution that contributes to this response — so"+ " insights backed by warehouse tables (Trends, Funnels, etc.) receive"+ " the same warnings as raw HogQL queries. Also carries access control"+ " warnings when a system-table query filters out objects the user can't"+ " access."+ ),+ )++class CachedMCPToolCallBreakdownQueryResponse(BaseModel):model_config = ConfigDict(extra="forbid",@@ -18635,6 +18709,53 @@ class MCPModelBreakdownQueryResponse(BaseModel):)+class MCPProtocolVersionBreakdownQueryResponse(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ error: str | None = Field(+ default=None,+ description=(+ "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise."+ ),+ )+ hogql: str | None = Field(default=None, description="Generated HogQL query.")+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")+ query_status: QueryStatus | None = Field(+ default=None,+ description=("Query status indicates whether next to the provided data, a query is still running."),+ )+ resolved_compare_date_range: ResolvedDateRangeResponse | None = Field(+ default=None,+ description=("The resolved previous/comparison period date range, when comparing against another period"),+ )+ resolved_date_range: ResolvedDateRangeResponse | None = Field(+ default=None, description="The date range used for the query"+ )+ results: list[MCPProtocolVersionBreakdownItem]+ timings: list[QueryTiming] | None = Field(+ default=None,+ description=("Measured timings for different parts of the query generation process"),+ )+ used_data_warehouse_sources: list[DataWarehouseSourceUsage] | None = Field(+ default=None,+ description=("Connector-synced data warehouse sources referenced by this query, if any."),+ )+ warnings: list[DataWarehouseSyncWarning | AccessControlFilterWarning] | None = Field(+ default=None,+ description=(+ "Warnings about data warehouse sources referenced by the query whose"+ " latest sync failed, is paused, hit a billing limit, or is otherwise"+ " stale. Results may not reflect current source data. Accumulated"+ " across every HogQL execution that contributes to this response — so"+ " insights backed by warehouse tables (Trends, Funnels, etc.) receive"+ " the same warnings as raw HogQL queries. Also carries access control"+ " warnings when a system-table query filters out objects the user can't"+ " access."+ ),+ )++class MCPToolCallBreakdownQueryResponse(BaseModel):model_config = ConfigDict(extra="forbid",@@ -24086,7 +24207,7 @@ class QueryResponseAlternative99(BaseModel):resolved_date_range: ResolvedDateRangeResponse | None = Field(default=None, description="The date range used for the query")- results: list[MCPToolTopUserItem]+ results: list[MCPProtocolVersionBreakdownItem]timings: list[QueryTiming] | None = Field(default=None,description=("Measured timings for different parts of the query generation process"),@@ -24133,7 +24254,7 @@ class QueryResponseAlternative100(BaseModel):resolved_date_range: ResolvedDateRangeResponse | None = Field(default=None, description="The date range used for the query")- results: list[MCPToolFailureItem]+ results: list[MCPToolTopUserItem]timings: list[QueryTiming] | None = Field(default=None,description=("Measured timings for different parts of the query generation process"),@@ -24180,7 +24301,7 @@ class QueryResponseAlternative101(BaseModel):resolved_date_range: ResolvedDateRangeResponse | None = Field(default=None, description="The date range used for the query")- results: list[MCPToolFailureOccurrenceItem]+ results: list[MCPToolFailureItem]timings: list[QueryTiming] | None = Field(default=None,description=("Measured timings for different parts of the query generation process"),@@ -24205,6 +24326,53 @@ class QueryResponseAlternative101(BaseModel):class QueryResponseAlternative102(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ error: str | None = Field(+ default=None,+ description=(+ "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise."+ ),+ )+ hogql: str | None = Field(default=None, description="Generated HogQL query.")+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")+ query_status: QueryStatus | None = Field(+ default=None,+ description=("Query status indicates whether next to the provided data, a query is still running."),+ )+ resolved_compare_date_range: ResolvedDateRangeResponse | None = Field(+ default=None,+ description=("The resolved previous/comparison period date range, when comparing against another period"),+ )+ resolved_date_range: ResolvedDateRangeResponse | None = Field(+ default=None, description="The date range used for the query"+ )+ results: list[MCPToolFailureOccurrenceItem]+ timings: list[QueryTiming] | None = Field(+ default=None,+ description=("Measured timings for different parts of the query generation process"),+ )+ used_data_warehouse_sources: list[DataWarehouseSourceUsage] | None = Field(+ default=None,+ description=("Connector-synced data warehouse sources referenced by this query, if any."),+ )+ warnings: list[DataWarehouseSyncWarning | AccessControlFilterWarning] | None = Field(+ default=None,+ description=(+ "Warnings about data warehouse sources referenced by the query whose"+ " latest sync failed, is paused, hit a billing limit, or is otherwise"+ " stale. Results may not reflect current source data. Accumulated"+ " across every HogQL execution that contributes to this response — so"+ " insights backed by warehouse tables (Trends, Funnels, etc.) receive"+ " the same warnings as raw HogQL queries. Also carries access control"+ " warnings when a system-table query filters out objects the user can't"+ " access."+ ),+ )+++class QueryResponseAlternative103(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24254,7 +24422,7 @@ class QueryResponseAlternative102(BaseModel):)-class QueryResponseAlternative103(BaseModel):+class QueryResponseAlternative104(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24301,7 +24469,7 @@ class QueryResponseAlternative103(BaseModel):)-class QueryResponseAlternative104(BaseModel):+class QueryResponseAlternative105(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24363,7 +24531,7 @@ class QueryResponseAlternative104(BaseModel):)-class QueryResponseAlternative105(BaseModel):+class QueryResponseAlternative106(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24410,7 +24578,7 @@ class QueryResponseAlternative105(BaseModel):)-class QueryResponseAlternative106(BaseModel):+class QueryResponseAlternative107(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24457,7 +24625,7 @@ class QueryResponseAlternative106(BaseModel):)-class QueryResponseAlternative107(BaseModel):+class QueryResponseAlternative108(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24504,7 +24672,7 @@ class QueryResponseAlternative107(BaseModel):)-class QueryResponseAlternative108(BaseModel):+class QueryResponseAlternative109(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24551,7 +24719,7 @@ class QueryResponseAlternative108(BaseModel):)-class QueryResponseAlternative109(BaseModel):+class QueryResponseAlternative110(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24598,7 +24766,7 @@ class QueryResponseAlternative109(BaseModel):)-class QueryResponseAlternative110(BaseModel):+class QueryResponseAlternative111(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24645,7 +24813,7 @@ class QueryResponseAlternative110(BaseModel):)-class QueryResponseAlternative111(BaseModel):+class QueryResponseAlternative112(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24692,7 +24860,7 @@ class QueryResponseAlternative111(BaseModel):)-class QueryResponseAlternative112(BaseModel):+class QueryResponseAlternative113(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -24740,7 +24908,7 @@ class QueryResponseAlternative112(BaseModel):)-class QueryResponseAlternative113(BaseModel):+class QueryResponseAlternative114(BaseModel):model_config = ConfigDict(extra="forbid",)@@ -27587,6 +27755,20 @@ class MCPModelBreakdownQuery(BaseModel):version: float | None = Field(default=None, description="version of the node, used for schema migrations")+class MCPProtocolVersionBreakdownQuery(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ dateRange: DateRange | None = None+ filterTestAccounts: bool | None = None+ kind: Literal["MCPProtocolVersionBreakdownQuery"] = "MCPProtocolVersionBreakdownQuery"+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")+ properties: list[EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter] | None = None+ response: MCPProtocolVersionBreakdownQueryResponse | None = None+ tags: QueryLogTags | None = None+ version: float | None = Field(default=None, description="version of the node, used for schema migrations")++class MCPToolCallBreakdownQuery(BaseModel):model_config = ConfigDict(extra="forbid",@@ -31427,6 +31609,7 @@ class QueryResponseAlternative(| QueryResponseAlternative111| QueryResponseAlternative112| QueryResponseAlternative113+ | QueryResponseAlternative114]):root: (@@ -31540,6 +31723,7 @@ class QueryResponseAlternative(| QueryResponseAlternative111| QueryResponseAlternative112| QueryResponseAlternative113+ | QueryResponseAlternative114)@@ -32660,6 +32844,7 @@ class HogQLAutocomplete(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -32787,6 +32972,7 @@ class HogQLMetadata(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -32934,6 +33120,7 @@ class MaxInsightContext(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -33077,6 +33264,7 @@ class QueryRequest(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -33212,6 +33400,7 @@ class QuerySchemaRoot(| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -33317,6 +33506,7 @@ class QuerySchemaRoot(| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -33427,6 +33617,7 @@ class QueryUpgradeRequest(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -33537,6 +33728,7 @@ class QueryUpgradeResponse(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuery@@ -33692,6 +33884,7 @@ class VisualizationArtifactContent(BaseModel):| MCPToolCallsAndErrorsQuery| MCPHarnessBreakdownQuery| MCPModelBreakdownQuery+ | MCPProtocolVersionBreakdownQuery| MCPToolTopUsersQuery| MCPToolFailuresQuery| MCPToolFailureOccurrencesQuerydiff --git a/posthog/schema_enums.py b/posthog/schema_enums.pyindex 6eddccf9634d..bf81532e596a 100644--- a/posthog/schema_enums.py+++ b/posthog/schema_enums.py@@ -2225,6 +2225,7 @@ class NodeKind(StrEnum):MCP_TOOL_CALLS_AND_ERRORS_QUERY = "MCPToolCallsAndErrorsQuery"MCP_HARNESS_BREAKDOWN_QUERY = "MCPHarnessBreakdownQuery"MCP_MODEL_BREAKDOWN_QUERY = "MCPModelBreakdownQuery"+ MCP_PROTOCOL_VERSION_BREAKDOWN_QUERY = "MCPProtocolVersionBreakdownQuery"MCP_TOOL_TOP_USERS_QUERY = "MCPToolTopUsersQuery"MCP_TOOL_FAILURES_QUERY = "MCPToolFailuresQuery"MCP_TOOL_FAILURE_OCCURRENCES_QUERY = "MCPToolFailureOccurrencesQuery"diff --git a/posthog/taxonomy/taxonomy.py b/posthog/taxonomy/taxonomy.pyindex 70d3911fadf7..dd0cd10eba8f 100644--- a/posthog/taxonomy/taxonomy.py+++ b/posthog/taxonomy/taxonomy.py@@ -3066,8 +3066,8 @@ CORE_FILTER_DEFINITIONS_BY_GROUP: dict[str, dict[str, CoreFilterDefinition]] = {},"$mcp_protocol_version": {"label": "MCP protocol version",- "description": "The MCP protocol version negotiated between client and server during initialize.",- "examples": ["2025-11-25", "2025-06-18"],+ "description": "The MCP protocol revision the request was made under, such as 2025-11-25 or 2026-07-28.",+ "examples": ["2025-11-25", "2025-06-18", "2026-07-28"],},"$mcp_transport": {"label": "MCP transport",diff --git a/products/mcp_analytics/backend/facade/queries.py b/products/mcp_analytics/backend/facade/queries.pyindex f76eddad6f34..181cfc4e77a6 100644--- a/products/mcp_analytics/backend/facade/queries.py+++ b/products/mcp_analytics/backend/facade/queries.py@@ -12,6 +12,9 @@ from products.mcp_analytics.backend.hogql_queries.dashboard_series import (from products.mcp_analytics.backend.hogql_queries.harness_breakdown import MCPHarnessBreakdownQueryRunnerfrom products.mcp_analytics.backend.hogql_queries.missing_capabilities import MCPMissingCapabilitiesQueryRunnerfrom products.mcp_analytics.backend.hogql_queries.model_breakdown import MCPModelBreakdownQueryRunner+from products.mcp_analytics.backend.hogql_queries.protocol_version_breakdown import (+ MCPProtocolVersionBreakdownQueryRunner,+)from products.mcp_analytics.backend.hogql_queries.tool_quality_tables import (MCPToolCategoriesQueryRunner,MCPToolCategoryCountsQueryRunner,@@ -33,6 +36,7 @@ from products.mcp_analytics.backend.hogql_queries.tool_tables import (__all__ = ["MCPHarnessBreakdownQueryRunner","MCPModelBreakdownQueryRunner",+ "MCPProtocolVersionBreakdownQueryRunner","MCPToolCallBreakdownQueryRunner","MCPToolCallsAndErrorsQueryRunner","MCPToolCategoriesQueryRunner",diff --git a/products/mcp_analytics/backend/hogql_queries/protocol_version_breakdown.py b/products/mcp_analytics/backend/hogql_queries/protocol_version_breakdown.pynew file mode 100644index 000000000000..0b9865eaeeb1--- /dev/null+++ b/products/mcp_analytics/backend/hogql_queries/protocol_version_breakdown.py@@ -0,0 +1,157 @@+from functools import cached_property+from typing import TYPE_CHECKING++from posthog.schema import (+ CachedMCPProtocolVersionBreakdownQueryResponse,+ MCPProtocolVersionBreakdownItem,+ MCPProtocolVersionBreakdownQuery,+ MCPProtocolVersionBreakdownQueryResponse,+)++from posthog.hogql import ast+from posthog.hogql.parser import parse_expr, parse_select+from posthog.hogql.query import execute_hogql_query++from posthog.clickhouse.query_tagging import Feature, Product, tags_context+from posthog.hogql_queries.query_runner import AnalyticsQueryRunner+from posthog.hogql_queries.utils.query_date_range import QueryDateRange++from products.mcp_analytics.backend.constants import MCP_TOOL_CALL_EVENT+from products.mcp_analytics.backend.hogql_queries.base import (+ mcp_query_date_range,+ shared_filter_exprs,+ validate_mcp_analytics_access,+)++if TYPE_CHECKING:+ from posthog.models.user import User+++# Existing projects have this property typed DateTime (ingestion inferred it from the date-shaped+# values), so properties.$mcp_protocol_version reads "2025-06-18" back as a timestamp. Read the raw string.+PROTOCOL_VERSION_SQL = "JSONExtractString(properties, '$mcp_protocol_version')"++# Matches the SDKs' era rule: versions are dated, and the rolling draft sits ahead of all of them.+CURRENT_PROTOCOL_VERSION = "2026-07-28"+IS_DATED_SQL = r"match(protocol_version, '^\\d{4}-\\d{2}-\\d{2}$')"++PROTOCOL_VERSION_SERIES_LIMIT = 8+++class MCPProtocolVersionBreakdownQueryRunner(AnalyticsQueryRunner[MCPProtocolVersionBreakdownQueryResponse]):+ query: MCPProtocolVersionBreakdownQuery+ cached_response: CachedMCPProtocolVersionBreakdownQueryResponse++ def validate_query_runner_access(self, user: "User") -> bool:+ return validate_mcp_analytics_access(self.team, user)++ @cached_property+ def query_date_range(self) -> QueryDateRange:+ return mcp_query_date_range(self.team, self.query.dateRange)++ def _where(self) -> ast.Expr:+ exprs = [+ parse_expr("event = {event}", placeholders={"event": ast.Constant(value=MCP_TOOL_CALL_EVENT)}),+ parse_expr(+ "timestamp >= {date_from}", placeholders={"date_from": self.query_date_range.date_from_as_hogql()}+ ),+ parse_expr("timestamp <= {date_to}", placeholders={"date_to": self.query_date_range.date_to_as_hogql()}),+ ]+ exprs.extend(shared_filter_exprs(self.team, self.query.properties, self.query.filterTestAccounts))+ return ast.And(exprs=exprs)++ def to_query(self) -> ast.SelectQuery | ast.SelectSetQuery:+ protocol_version_totals = parse_select(+ """+ SELECT+ protocol_version,+ protocol_version = 'draft' OR ({is_dated} AND protocol_version >= {current_version}) AS is_current,+ count() AS total_calls+ FROM (+ SELECT coalesce(nullIf(trim({protocol_version_sql}), ''), 'Unknown') AS protocol_version+ FROM events+ WHERE {where}+ )+ GROUP BY protocol_version+ """,+ placeholders={+ "protocol_version_sql": parse_expr(PROTOCOL_VERSION_SQL),+ "is_dated": parse_expr(IS_DATED_SQL),+ "current_version": ast.Constant(value=CURRENT_PROTOCOL_VERSION),+ "where": self._where(),+ },+ )+ # Current versions rank ahead of the cut so the long tail folded into 'Other' is only ever legacy.+ return parse_select(+ """+ SELECT protocol_version, is_current, total_calls+ FROM (+ SELECT+ if(+ protocol_version = 'Unknown', 'Unknown',+ if(protocol_version_rank <= {limit}, protocol_version, 'Other')+ ) AS protocol_version,+ is_current,+ sum(total_calls) AS total_calls+ FROM (+ SELECT+ protocol_version,+ is_current,+ total_calls,+ row_number() OVER (+ ORDER BY protocol_version = 'Unknown' ASC, is_current DESC, total_calls DESC, protocol_version ASC+ ) AS protocol_version_rank+ FROM {protocol_version_totals}+ )+ GROUP BY protocol_version, is_current+ )+ ORDER BY+ multiIf(+ protocol_version = 'Unknown', 4,+ protocol_version = 'Other', 3,+ protocol_version = 'draft', 0,+ {is_dated}, 1,+ 2+ ) ASC,+ if({is_dated}, protocol_version, '') DESC,+ total_calls DESC,+ protocol_version ASC+ """,+ placeholders={+ "protocol_version_totals": protocol_version_totals,+ "is_dated": parse_expr(IS_DATED_SQL),+ "limit": ast.Constant(value=PROTOCOL_VERSION_SERIES_LIMIT),+ },+ )++ def _calculate(self) -> MCPProtocolVersionBreakdownQueryResponse:+ with tags_context(+ product=Product.MCP_ANALYTICS,+ feature=Feature.QUERY,+ team_id=self.team.id,+ name="mcp_protocol_version_breakdown_query",+ ):+ response = execute_hogql_query(+ query=self.to_query(),+ team=self.team,+ user=self.user,+ query_type="mcp_protocol_version_breakdown_query",+ timings=self.timings,+ modifiers=self.modifiers,+ limit_context=self.limit_context,+ )++ rows = response.results or []+ results = [+ MCPProtocolVersionBreakdownItem(+ protocol_version=str(row[0]), is_current=bool(row[1]), total_calls=int(row[2] or 0)+ )+ for row in rows+ ]++ return MCPProtocolVersionBreakdownQueryResponse(+ results=results,+ timings=response.timings,+ hogql=response.hogql,+ modifiers=self.modifiers,+ )diff --git a/products/mcp_analytics/backend/tests/test_dashboard_series.py b/products/mcp_analytics/backend/tests/test_dashboard_series.pyindex 024fb6c4846f..5760ca91aef6 100644--- a/products/mcp_analytics/backend/tests/test_dashboard_series.py+++ b/products/mcp_analytics/backend/tests/test_dashboard_series.py@@ -220,7 +220,10 @@ class TestMCPDashboardSeriesGate(_MCPAnalyticsTeamScopedTestMixin, ClickhouseTes[(kind, scopes, expected_status)for kind in (+ "MCPHarnessBreakdownQuery","MCPMissingCapabilitiesQuery",+ "MCPModelBreakdownQuery",+ "MCPProtocolVersionBreakdownQuery","MCPToolCallsAndErrorsQuery","MCPToolCallBreakdownQuery","MCPToolCategoryMapQuery",diff --git a/products/mcp_analytics/backend/tests/test_protocol_version_breakdown.py b/products/mcp_analytics/backend/tests/test_protocol_version_breakdown.pynew file mode 100644index 000000000000..6865df7dd6c9--- /dev/null+++ b/products/mcp_analytics/backend/tests/test_protocol_version_breakdown.py@@ -0,0 +1,124 @@+from datetime import UTC, datetime+from typing import Any++from posthog.test.base import APIBaseTest, ClickhouseTestMixin, _create_event, flush_persons_and_events++from parameterized import parameterized++from posthog.schema import DateRange, MCPProtocolVersionBreakdownQuery++from posthog.models import PropertyDefinition++from products.mcp_analytics.backend.hogql_queries.protocol_version_breakdown import (+ PROTOCOL_VERSION_SERIES_LIMIT,+ MCPProtocolVersionBreakdownQueryRunner,+)+from products.mcp_analytics.backend.tests import _MCPAnalyticsTeamScopedTestMixin+++class TestMCPProtocolVersionBreakdownQueryRunner(_MCPAnalyticsTeamScopedTestMixin, ClickhouseTestMixin, APIBaseTest):+ def _emit(self, *, properties: dict[str, Any], distinct_id: str) -> None:+ _create_event(+ team=self.team,+ event="$mcp_tool_call",+ distinct_id=distinct_id,+ timestamp=datetime.now(tz=UTC),+ properties={"$mcp_tool_name": "query_run", **properties},+ )++ def _define_as_datetime(self) -> None:+ PropertyDefinition.objects.create(+ team=self.team,+ name="$mcp_protocol_version",+ property_type="DateTime",+ type=PropertyDefinition.Type.EVENT,+ )++ def _emit_calls(self, calls_by_version: dict[str | None, int]) -> None:+ for version, calls in calls_by_version.items():+ properties = {} if version is None else {"$mcp_protocol_version": version}+ for call in range(calls):+ self._emit(distinct_id=f"{version}-{call}", properties=properties)+ flush_persons_and_events()++ def _rows(self) -> list[tuple[str, bool, int]]:+ runner = MCPProtocolVersionBreakdownQueryRunner(+ query=MCPProtocolVersionBreakdownQuery(dateRange=DateRange(date_from="-90d")),+ team=self.team,+ )+ return [(row.protocol_version, row.is_current, row.total_calls) for row in runner.calculate().results]++ @parameterized.expand(+ [+ ("stateless_version", "2026-07-28", True),+ ("later_version", "2027-01-15", True),+ ("draft_version", "draft", True),+ ("legacy_version", "2025-11-25", False),+ ("date_shaped_non_version", "2026-01-26", False),+ ("non_date_value", "v2", False),+ ]+ )+ def test_returns_raw_version_despite_datetime_typed_property(+ self, _name: str, version: str, is_current: bool+ ) -> None:+ self._define_as_datetime()+ self._emit_calls({version: 1})++ assert self._rows() == [(version, is_current, 1)]++ def test_missing_or_blank_version_is_unknown(self) -> None:+ self._define_as_datetime()+ self._emit(distinct_id="blank", properties={"$mcp_protocol_version": " "})+ self._emit_calls({None: 1, "2025-06-18": 1})++ assert self._rows() == [("2025-06-18", False, 1), ("Unknown", False, 2)]++ def test_orders_draft_then_dated_newest_first_then_other_values_then_unknown(self) -> None:+ self._emit_calls({"2025-06-18": 50, None: 40, "v2": 30, "2026-07-28": 5, "draft": 1, "2025-11-25": 20})++ assert self._rows() == [+ ("draft", True, 1),+ ("2026-07-28", True, 5),+ ("2025-11-25", False, 20),+ ("2025-06-18", False, 50),+ ("v2", False, 30),+ ("Unknown", False, 40),+ ]++ def test_folds_only_legacy_long_tail_into_other(self) -> None:+ legacy: dict[str | None, int] = {+ f"2024-01-{day:02}": 10 + day for day in range(1, PROTOCOL_VERSION_SERIES_LIMIT + 2)+ }+ self._emit_calls({**legacy, "2026-07-28": 1})++ rows = self._rows()++ assert rows[0] == ("2026-07-28", True, 1)+ assert rows[-1] == ("Other", False, 11 + 12)+ assert len(rows) == PROTOCOL_VERSION_SERIES_LIMIT + 1++ def test_keeps_current_calls_current_when_they_overflow_the_cut(self) -> None:+ current: dict[str | None, int] = {+ f"2027-01-{day:02}": 10 + day for day in range(1, PROTOCOL_VERSION_SERIES_LIMIT + 2)+ }+ self._emit_calls({**current, "2025-06-18": 1})++ rows = self._rows()++ assert ("Other", True, 11) in rows+ assert ("Other", False, 1) in rows+ assert sum(calls for _, is_current, calls in rows if is_current) == sum(+ calls for version, calls in current.items() if version+ )++ def test_ignores_calls_outside_the_date_range(self) -> None:+ _create_event(+ team=self.team,+ event="$mcp_tool_call",+ distinct_id="out-of-range",+ timestamp=datetime(2000, 1, 1, tzinfo=UTC),+ properties={"$mcp_tool_name": "query_run", "$mcp_protocol_version": "2025-06-18"},+ )+ self._emit_calls({"2025-06-18": 1})++ assert self._rows() == [("2025-06-18", False, 1)]diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex fdb847fea107..e32f0e09eefd 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -53293,6 +53293,48 @@ export namespace Schemas {version?: number | null;}+ export interface MCPProtocolVersionBreakdownItem {+ /** On the stateless 2026-07-28 revision or later, or the rolling draft. */+ is_current: boolean;+ protocol_version: string;+ total_calls: number;+ }++ export interface MCPProtocolVersionBreakdownQueryResponse {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The resolved previous/comparison period date range, when comparing against another period */+ resolved_compare_date_range?: ResolvedDateRangeResponse | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MCPProtocolVersionBreakdownItem[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Connector-synced data warehouse sources referenced by this query, if any. */+ used_data_warehouse_sources?: DataWarehouseSourceUsage[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access. */+ warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;+ }++ export interface MCPProtocolVersionBreakdownQuery {+ dateRange?: DateRange | null;+ filterTestAccounts?: boolean | null;+ kind?: 'MCPProtocolVersionBreakdownQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties?: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter)[] | null;+ response?: MCPProtocolVersionBreakdownQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }+export interface MCPToolTopUserItem {calls: number;distinct_id: string;@@ -54041,7 +54083,7 @@ export namespace Schemas {query: string;response?: HogQLMetadataResponse | null;/** Query within which "expr" and "template" are validated. Defaults to "select * from events" */- sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;+ sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;tags?: QueryLogTags | null;/** Variables to be subsituted into the query */variables?: HogQLMetadataVariables;@@ -54067,7 +54109,7 @@ export namespace Schemas {query: string;response?: HogQLAutocompleteResponse | null;/** Query in whose context to validate. */- sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;+ sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | null;/** Start position of the editor word */startPosition: number;tags?: QueryLogTags | null;@@ -84001,7 +84043,7 @@ export namespace Schemas {* ```** For more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access). */- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;/** Whether results should be calculated sync or async, and how much to rely on the cache:* - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache* - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache@@ -86363,7 +86405,7 @@ export namespace Schemas {resolved_compare_date_range?: ResolvedDateRangeResponse | null;/** The date range used for the query */resolved_date_range?: ResolvedDateRangeResponse | null;- results: MCPToolTopUserItem[];+ results: MCPProtocolVersionBreakdownItem[];/** Measured timings for different parts of the query generation process */timings?: QueryTiming[] | null;/** Connector-synced data warehouse sources referenced by this query, if any. */@@ -86385,7 +86427,7 @@ export namespace Schemas {resolved_compare_date_range?: ResolvedDateRangeResponse | null;/** The date range used for the query */resolved_date_range?: ResolvedDateRangeResponse | null;- results: MCPToolFailureItem[];+ results: MCPToolTopUserItem[];/** Measured timings for different parts of the query generation process */timings?: QueryTiming[] | null;/** Connector-synced data warehouse sources referenced by this query, if any. */@@ -86407,7 +86449,7 @@ export namespace Schemas {resolved_compare_date_range?: ResolvedDateRangeResponse | null;/** The date range used for the query */resolved_date_range?: ResolvedDateRangeResponse | null;- results: MCPToolFailureOccurrenceItem[];+ results: MCPToolFailureItem[];/** Measured timings for different parts of the query generation process */timings?: QueryTiming[] | null;/** Connector-synced data warehouse sources referenced by this query, if any. */@@ -86417,6 +86459,28 @@ export namespace Schemas {}export interface QueryResponseAlternative102 {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The resolved previous/comparison period date range, when comparing against another period */+ resolved_compare_date_range?: ResolvedDateRangeResponse | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MCPToolFailureOccurrenceItem[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Connector-synced data warehouse sources referenced by this query, if any. */+ used_data_warehouse_sources?: DataWarehouseSourceUsage[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access. */+ warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;+ }++ export interface QueryResponseAlternative103 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86439,7 +86503,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative103 {+ export interface QueryResponseAlternative104 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86461,7 +86525,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative104 {+ export interface QueryResponseAlternative105 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86489,7 +86553,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative105 {+ export interface QueryResponseAlternative106 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86511,7 +86575,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative106 {+ export interface QueryResponseAlternative107 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86533,7 +86597,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative107 {+ export interface QueryResponseAlternative108 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86555,7 +86619,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative108 {+ export interface QueryResponseAlternative109 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86577,7 +86641,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative109 {+ export interface QueryResponseAlternative110 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86599,7 +86663,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative110 {+ export interface QueryResponseAlternative111 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86621,7 +86685,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative111 {+ export interface QueryResponseAlternative112 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86643,7 +86707,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative112 {+ export interface QueryResponseAlternative113 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Whether more reports exist past this page. */@@ -86667,7 +86731,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export interface QueryResponseAlternative113 {+ export interface QueryResponseAlternative114 {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;/** Generated HogQL query. */@@ -86689,7 +86753,7 @@ export namespace Schemas {warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;}- export type QueryResponseAlternative = { [key: string]: unknown } | QueryResponseAlternative1 | QueryResponseAlternative2 | QueryResponseAlternative3 | QueryResponseAlternative4 | QueryResponseAlternative5 | QueryResponseAlternative6 | QueryResponseAlternative7 | QueryResponseAlternative8 | QueryResponseAlternative9 | QueryResponseAlternative10 | QueryResponseAlternative11 | QueryResponseAlternative12 | QueryResponseAlternative13 | QueryResponseAlternative14 | QueryResponseAlternative15 | QueryResponseAlternative16 | QueryResponseAlternative17 | QueryResponseAlternative18 | QueryResponseAlternative19 | QueryResponseAlternative20 | QueryResponseAlternative21 | QueryResponseAlternative22 | QueryResponseAlternative23 | QueryResponseAlternative24 | QueryResponseAlternative25 | QueryResponseAlternative26 | QueryResponseAlternative28 | QueryResponseAlternative29 | QueryResponseAlternative30 | QueryResponseAlternative31 | QueryResponseAlternative32 | QueryResponseAlternative33 | QueryResponseAlternative34 | QueryResponseAlternative35 | QueryResponseAlternative36 | QueryResponseAlternative37 | unknown | QueryResponseAlternative38 | QueryResponseAlternative39 | QueryResponseAlternative40 | QueryResponseAlternative41 | QueryResponseAlternative42 | QueryResponseAlternative43 | QueryResponseAlternative44 | QueryResponseAlternative45 | QueryResponseAlternative46 | QueryResponseAlternative47 | QueryResponseAlternative48 | QueryResponseAlternative49 | QueryResponseAlternative50 | QueryResponseAlternative51 | QueryResponseAlternative52 | QueryResponseAlternative53 | QueryResponseAlternative54 | QueryResponseAlternative55 | QueryResponseAlternative56 | QueryResponseAlternative58 | QueryResponseAlternative59 | QueryResponseAlternative60 | QueryResponseAlternative61 | QueryResponseAlternative62 | QueryResponseAlternative63 | QueryResponseAlternative64 | QueryResponseAlternative65 | QueryResponseAlternative66 | QueryResponseAlternative68 | QueryResponseAlternative69 | QueryResponseAlternative70 | QueryResponseAlternative71 | QueryResponseAlternative72 | QueryResponseAlternative73 | QueryResponseAlternative74 | QueryResponseAlternative75 | QueryResponseAlternative76 | QueryResponseAlternative77 | QueryResponseAlternative78 | QueryResponseAlternative79 | QueryResponseAlternative80 | QueryResponseAlternative81 | QueryResponseAlternative82 | QueryResponseAlternative83 | QueryResponseAlternative84 | QueryResponseAlternative87 | QueryResponseAlternative88 | QueryResponseAlternative89 | QueryResponseAlternative90 | QueryResponseAlternative91 | QueryResponseAlternative92 | QueryResponseAlternative93 | QueryResponseAlternative94 | QueryResponseAlternative95 | QueryResponseAlternative96 | QueryResponseAlternative97 | QueryResponseAlternative98 | QueryResponseAlternative99 | QueryResponseAlternative100 | QueryResponseAlternative101 | QueryResponseAlternative102 | QueryResponseAlternative103 | QueryResponseAlternative104 | QueryResponseAlternative105 | QueryResponseAlternative106 | QueryResponseAlternative107 | QueryResponseAlternative108 | QueryResponseAlternative109 | QueryResponseAlternative110 | QueryResponseAlternative111 | QueryResponseAlternative112 | QueryResponseAlternative113;+ export type QueryResponseAlternative = { [key: string]: unknown } | QueryResponseAlternative1 | QueryResponseAlternative2 | QueryResponseAlternative3 | QueryResponseAlternative4 | QueryResponseAlternative5 | QueryResponseAlternative6 | QueryResponseAlternative7 | QueryResponseAlternative8 | QueryResponseAlternative9 | QueryResponseAlternative10 | QueryResponseAlternative11 | QueryResponseAlternative12 | QueryResponseAlternative13 | QueryResponseAlternative14 | QueryResponseAlternative15 | QueryResponseAlternative16 | QueryResponseAlternative17 | QueryResponseAlternative18 | QueryResponseAlternative19 | QueryResponseAlternative20 | QueryResponseAlternative21 | QueryResponseAlternative22 | QueryResponseAlternative23 | QueryResponseAlternative24 | QueryResponseAlternative25 | QueryResponseAlternative26 | QueryResponseAlternative28 | QueryResponseAlternative29 | QueryResponseAlternative30 | QueryResponseAlternative31 | QueryResponseAlternative32 | QueryResponseAlternative33 | QueryResponseAlternative34 | QueryResponseAlternative35 | QueryResponseAlternative36 | QueryResponseAlternative37 | unknown | QueryResponseAlternative38 | QueryResponseAlternative39 | QueryResponseAlternative40 | QueryResponseAlternative41 | QueryResponseAlternative42 | QueryResponseAlternative43 | QueryResponseAlternative44 | QueryResponseAlternative45 | QueryResponseAlternative46 | QueryResponseAlternative47 | QueryResponseAlternative48 | QueryResponseAlternative49 | QueryResponseAlternative50 | QueryResponseAlternative51 | QueryResponseAlternative52 | QueryResponseAlternative53 | QueryResponseAlternative54 | QueryResponseAlternative55 | QueryResponseAlternative56 | QueryResponseAlternative58 | QueryResponseAlternative59 | QueryResponseAlternative60 | QueryResponseAlternative61 | QueryResponseAlternative62 | QueryResponseAlternative63 | QueryResponseAlternative64 | QueryResponseAlternative65 | QueryResponseAlternative66 | QueryResponseAlternative68 | QueryResponseAlternative69 | QueryResponseAlternative70 | QueryResponseAlternative71 | QueryResponseAlternative72 | QueryResponseAlternative73 | QueryResponseAlternative74 | QueryResponseAlternative75 | QueryResponseAlternative76 | QueryResponseAlternative77 | QueryResponseAlternative78 | QueryResponseAlternative79 | QueryResponseAlternative80 | QueryResponseAlternative81 | QueryResponseAlternative82 | QueryResponseAlternative83 | QueryResponseAlternative84 | QueryResponseAlternative87 | QueryResponseAlternative88 | QueryResponseAlternative89 | QueryResponseAlternative90 | QueryResponseAlternative91 | QueryResponseAlternative92 | QueryResponseAlternative93 | QueryResponseAlternative94 | QueryResponseAlternative95 | QueryResponseAlternative96 | QueryResponseAlternative97 | QueryResponseAlternative98 | QueryResponseAlternative99 | QueryResponseAlternative100 | QueryResponseAlternative101 | QueryResponseAlternative102 | QueryResponseAlternative103 | QueryResponseAlternative104 | QueryResponseAlternative105 | QueryResponseAlternative106 | QueryResponseAlternative107 | QueryResponseAlternative108 | QueryResponseAlternative109 | QueryResponseAlternative110 | QueryResponseAlternative111 | QueryResponseAlternative112 | QueryResponseAlternative113 | QueryResponseAlternative114;export interface QueryScanResponse {analysis?: QueryScanAnalysis | null;@@ -86700,11 +86764,11 @@ export namespace Schemas {}export interface QueryUpgradeRequest {- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;}export interface QueryUpgradeResponse {- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingReleasesQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | MarketingAnalyticsRetentionQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | MetricsHistogramQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPModelBreakdownQuery | MCPProtocolVersionBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | MCPMissingCapabilitiesQuery | PropertyValuesQuery;}export interface QuotaResourceLimit {