:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(mcp-analytics): show data on tool reports for names with a slash (#107627)
posthog[bot]fa0f3d4b6317
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 44ca754b1265..31e246b7d322 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -11167,9 +11167,9 @@ snapshots:scenes-app-mcp-analytics-tool-detail--tool-detail--medium--light:hash: v1.k794b7964.ecbcffe340418fdb5a281cce408ffab725ea1566f2c5b6bb570c6835f3f17fcf.uoJ3Spy9KCqXxZ3l-9Fz1p9yHNuxnOl8efYY9EJqZvgscenes-app-mcp-analytics-tool-detail--tool-detail--narrow--dark:- hash: v1.k794b7964.d86efef4af126caf22ff4c5918d7bfa25ecfda0c1063bf9fd859f6c4c4f246a3.jJ52LeAW-6WxLZAgwJKoSe8we01xh-svaIN1Q0-v8KQ+ hash: v1.k794b7964.081b3053602014fdca8e24de636e536e9c16d3c9961527b8845e151566ebe0ee.oAaVgxfPrzC4_wY1HRPS90x95bJf2HMzlKQcRd19RGcscenes-app-mcp-analytics-tool-detail--tool-detail--narrow--light:- hash: v1.k794b7964.95d48e2e2ffb0606c6b3a6df79e7d03073e4d936edc534de726abad8c8391f6a.3g0HZ5-M6X0bR86EIhbcS1naeNLsF-zVDeJQ-uWzjak+ hash: v1.k794b7964.00ceef2e0994758bb478c75d862b6fe8e0cf0e599796efcbfabfaa357978454e.DURGkMAZ9wm50UtSLVXZSBlM_DgNQpvWhfsREqfyKJUscenes-app-mcp-analytics-tool-detail--tool-detail--wide--dark:hash: v1.k794b7964.0361c34a529e803a7a6b105aa981cb722b3143a3797f7088ea4de681b61cb801.kmXMUjJP2l5EFrzAtPuRgh5EWGDe1NOzmi4Q10fYl3gscenes-app-mcp-analytics-tool-detail--tool-detail--wide--light:diff --git a/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.stories.tsx b/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.stories.tsxindex 3fe597f0401e..21744473f083 100644--- a/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.stories.tsx+++ b/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.stories.tsx@@ -7,7 +7,7 @@ import { urls } from 'scenes/urls'import { mswDecorator } from '~/mocks/browser'-const TOOL_NAME = 'execute-sql'+const TOOL_NAME = 'warehouse/execute-sql'// This tool's share of all MCP activity in the window: enough calls and sessions to exercise the// call-share and session-share subtitles on the Calls and Sessions tiles with a realistic percentage.@@ -128,7 +128,7 @@ const FAILURE_BUCKETS = []interface MockQueryBody {- query?: { kind?: string; neighborDirection?: 'before' | 'after' }+ query?: { kind?: string; toolName?: string; neighborDirection?: 'before' | 'after' }}const meta: Meta = {@@ -143,6 +143,9 @@ const meta: Meta = {post: {'/api/environments/:team_id/query/:kind': async ({ request }) => {const body = (await request.json()) as MockQueryBody+ if (body?.query?.toolName?.includes('%')) {+ return [200, { results: [] }]+ }switch (body?.query?.kind) {case 'MCPToolStatsQuery':return [200, { results: [STATS] }]diff --git a/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.tsx b/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.tsxindex 4a9ac07004ad..7f21ce73ffc7 100644--- a/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.tsx+++ b/products/mcp_analytics/frontend/MCPAnalyticsToolDetail.tsx@@ -503,8 +503,9 @@ function TrendChart({)}-export function MCPAnalyticsToolDetail({ toolName }: { toolName: string }): JSX.Element {+export function MCPAnalyticsToolDetail(): JSX.Element {const {+ toolName,summary,summaryLoading,descriptions,@@ -530,8 +531,8 @@ export function MCPAnalyticsToolDetail({ toolName }: { toolName: string }): JSX.interval,pinnedInterval,incompleteTail,- } = useValues(mcpAnalyticsToolDetailLogic({ toolName }))- const { selectFailure, setDateFilter, loadAllSections } = useActions(mcpAnalyticsToolDetailLogic({ toolName }))+ } = useValues(mcpAnalyticsToolDetailLogic)+ const { selectFailure, setDateFilter, loadAllSections } = useActions(mcpAnalyticsToolDetailLogic)const { timezone } = useValues(teamLogic)const { featureFlags } = useValues(featureFlagLogic)const intentRoutingEnabled = !!featureFlags[FEATURE_FLAGS.MCP_ANALYTICS_INTENT_ROUTING]@@ -797,18 +798,17 @@ export function MCPAnalyticsToolDetail({ toolName }: { toolName: string }): JSX./></div>- <FailureOccurrencesModal toolName={toolName} />+ <FailureOccurrencesModal /></SceneContent>)}// Drill-down into one failure bucket: the individual errored calls, each with a// copyable, paste-ready context block for handing to a coding agent.-function FailureOccurrencesModal({ toolName }: { toolName: string }): JSX.Element {- const { selectedFailure, failureOccurrences, failureOccurrencesLoading } = useValues(- mcpAnalyticsToolDetailLogic({ toolName })- )- const { selectFailure } = useActions(mcpAnalyticsToolDetailLogic({ toolName }))+function FailureOccurrencesModal(): JSX.Element {+ const { toolName, selectedFailure, failureOccurrences, failureOccurrencesLoading } =+ useValues(mcpAnalyticsToolDetailLogic)+ const { selectFailure } = useActions(mcpAnalyticsToolDetailLogic)const occurrenceContext = (o: MCPToolFailureOccurrenceItem): MCPErrorContext => ({toolName,