: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
chore(mcp): leave one way to send feedback (#100103)
Georgis Andonis336d42016251
diff --git a/products/mcp_analytics/mcp/tools.yaml b/products/mcp_analytics/mcp/tools.yamlindex 235234ee7c5a..88291e8e3db2 100644--- a/products/mcp_analytics/mcp/tools.yaml+++ b/products/mcp_analytics/mcp/tools.yaml@@ -116,23 +116,7 @@ tools:enabled: falsemcp-feedback-submit:operation: mcp_analytics_feedback_create- enabled: true- scopes:- - mcp_analytics:write- annotations:- readOnly: false- destructive: false- idempotent: false- title: Submit MCP feedback- description: >- Submit qualitative feedback about the current MCP workflow, tool result, or product experience. Use this- when the available tools worked but the experience was confusing, incomplete, or could be improved.- include_params:- - goal- - feedback- - category- - attempted_tool- feature_flag: mcp-analytics+ enabled: falsemcp-missing-capability-list:operation: mcp_analytics_missing_capabilities_listenabled: falsediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 37792b9adad8..cab8eda312a0 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -8237,21 +8237,6 @@"readOnlyHint": true}},- "mcp-feedback-submit": {- "description": "Submit qualitative feedback about the current MCP workflow, tool result, or product experience. Use this when the available tools worked but the experience was confusing, incomplete, or could be improved.",- "category": "MCP analytics",- "feature": "mcp_analytics",- "summary": "Submit MCP feedback",- "title": "Submit MCP feedback",- "required_scopes": ["mcp_analytics:write"],- "annotations": {- "destructiveHint": false,- "idempotentHint": false,- "openWorldHint": true,- "readOnlyHint": false- },- "feature_flag": "mcp-analytics"- },"mcp-missing-capability-report": {"description": "Report that the current MCP tools are insufficient for the user's goal. Use this when a missing tool, missing workflow support, or missing explanation blocks progress. Describe the gap without personal data or sensitive query content. This records feedback for the PostHog team; continue with a fallback when possible.","category": "MCP analytics",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 0b5c010ae137..bb4b3fbbb9ad 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -8631,21 +8631,6 @@"readOnlyHint": true}},- "mcp-feedback-submit": {- "description": "Submit qualitative feedback about the current MCP workflow, tool result, or product experience. Use this when the available tools worked but the experience was confusing, incomplete, or could be improved.",- "category": "MCP analytics",- "feature": "mcp_analytics",- "summary": "Submit MCP feedback",- "title": "Submit MCP feedback",- "required_scopes": ["mcp_analytics:write"],- "annotations": {- "destructiveHint": false,- "idempotentHint": false,- "openWorldHint": true,- "readOnlyHint": false- },- "feature_flag": "mcp-analytics"- },"mcp-missing-capability-report": {"description": "Report that the current MCP tools are insufficient for the user's goal. Use this when a missing tool, missing workflow support, or missing explanation blocks progress. Describe the gap without personal data or sensitive query content. This records feedback for the PostHog team; continue with a fallback when possible.","category": "MCP analytics",diff --git a/services/mcp/src/generated/mcp_analytics/api.ts b/services/mcp/src/generated/mcp_analytics/api.tsindex 662904ed7dce..7836aa34dbd8 100644--- a/services/mcp/src/generated/mcp_analytics/api.ts+++ b/services/mcp/src/generated/mcp_analytics/api.ts@@ -3,104 +3,11 @@* MCP service uses these Zod schemas for generated tool handlers.* To regenerate: hogli build:openapi*- * PostHog API - MCP 7 enabled ops+ * PostHog API - MCP 6 enabled ops* OpenAPI spec version: 1.0.0*/import * as zod from 'zod'-/**- * Create a new MCP feedback submission for the current project.- */-export const McpAnalyticsFeedbackCreateParams = () => zod.object({- project_id: zod- .string()- .describe(- "Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."- ),-})--export const mcpAnalyticsFeedbackCreateBodyAttemptedToolDefault = ``-export const mcpAnalyticsFeedbackCreateBodyAttemptedToolMax = 200--export const mcpAnalyticsFeedbackCreateBodyMcpClientNameDefault = ``-export const mcpAnalyticsFeedbackCreateBodyMcpClientNameMax = 200--export const mcpAnalyticsFeedbackCreateBodyMcpClientVersionDefault = ``-export const mcpAnalyticsFeedbackCreateBodyMcpClientVersionMax = 100--export const mcpAnalyticsFeedbackCreateBodyMcpProtocolVersionDefault = ``-export const mcpAnalyticsFeedbackCreateBodyMcpProtocolVersionMax = 50--export const mcpAnalyticsFeedbackCreateBodyMcpTransportDefault = ``-export const mcpAnalyticsFeedbackCreateBodyMcpTransportMax = 50--export const mcpAnalyticsFeedbackCreateBodyMcpSessionIdDefault = ``-export const mcpAnalyticsFeedbackCreateBodyMcpSessionIdMax = 200--export const mcpAnalyticsFeedbackCreateBodyMcpTraceIdDefault = ``-export const mcpAnalyticsFeedbackCreateBodyMcpTraceIdMax = 200--export const mcpAnalyticsFeedbackCreateBodyGoalMax = 500--export const mcpAnalyticsFeedbackCreateBodyFeedbackMax = 5000--export const mcpAnalyticsFeedbackCreateBodyCategoryDefault = `other`--export const McpAnalyticsFeedbackCreateBody = () => zod.object({- attempted_tool: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyAttemptedToolMax)- .default(mcpAnalyticsFeedbackCreateBodyAttemptedToolDefault)- .describe('The tool the user tried before leaving feedback, if known.'),- mcp_client_name: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyMcpClientNameMax)- .default(mcpAnalyticsFeedbackCreateBodyMcpClientNameDefault)- .describe('MCP client name, for example Claude Desktop or Cursor.'),- mcp_client_version: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyMcpClientVersionMax)- .default(mcpAnalyticsFeedbackCreateBodyMcpClientVersionDefault)- .describe('Version string for the MCP client when available.'),- mcp_protocol_version: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyMcpProtocolVersionMax)- .default(mcpAnalyticsFeedbackCreateBodyMcpProtocolVersionDefault)- .describe('MCP protocol version negotiated for the session when available.'),- mcp_transport: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyMcpTransportMax)- .default(mcpAnalyticsFeedbackCreateBodyMcpTransportDefault)- .describe('Transport used for the MCP session, for example streamable_http or sse.'),- mcp_session_id: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyMcpSessionIdMax)- .default(mcpAnalyticsFeedbackCreateBodyMcpSessionIdDefault)- .describe('Stable MCP session identifier when available.'),- mcp_trace_id: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyMcpTraceIdMax)- .default(mcpAnalyticsFeedbackCreateBodyMcpTraceIdDefault)- .describe('Trace identifier for the surrounding MCP workflow when available.'),- goal: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyGoalMax)- .describe("The user's intended outcome when using MCP."),- feedback: zod- .string()- .max(mcpAnalyticsFeedbackCreateBodyFeedbackMax)- .describe('Concrete feedback about the MCP experience, tool result, or workflow friction.'),- category: zod- .enum(['results', 'usability', 'bug', 'docs', 'other'])- .describe(- '\* `results` - Results\n\* `usability` - Usability\n\* `bug` - Bug\n\* `docs` - Docs\n\* `other` - Other'- )- .default(mcpAnalyticsFeedbackCreateBodyCategoryDefault)- .describe(- 'High-level category for the feedback.\n\n\* `results` - Results\n\* `usability` - Usability\n\* `bug` - Bug\n\* `docs` - Docs\n\* `other` - Other'- ),-})-/*** Return the most recent intent cluster snapshot for the current project. Returns an empty IDLE snapshot when no clustering run has happened yet.*/diff --git a/services/mcp/src/tools/generated/mcp_analytics.ts b/services/mcp/src/tools/generated/mcp_analytics.tsindex ab661f8555d0..2d91719ea900 100644--- a/services/mcp/src/tools/generated/mcp_analytics.ts+++ b/services/mcp/src/tools/generated/mcp_analytics.ts@@ -137,45 +137,6 @@ const mcpAnalyticsSessionsToolCalls = (): ToolBase<},})-const McpFeedbackSubmitSchema = () => {- const McpAnalyticsFeedbackCreateBody = orvalSchemas.McpAnalyticsFeedbackCreateBody()- return McpAnalyticsFeedbackCreateBody.omit({- mcp_client_name: true,- mcp_client_version: true,- mcp_protocol_version: true,- mcp_transport: true,- mcp_session_id: true,- mcp_trace_id: true,- })-}--const mcpFeedbackSubmit = (): ToolBase<ReturnType<typeof McpFeedbackSubmitSchema>, Schemas.MCPAnalyticsSubmission> => ({- name: 'mcp-feedback-submit',- schema: McpFeedbackSubmitSchema(),- handler: async (context: Context, params: z.infer<ReturnType<typeof McpFeedbackSubmitSchema>>) => {- const projectId = await context.stateManager.getProjectId()- const body: Record<string, unknown> = {}- if (params.attempted_tool !== undefined) {- body['attempted_tool'] = params.attempted_tool- }- if (params.goal !== undefined) {- body['goal'] = params.goal- }- if (params.feedback !== undefined) {- body['feedback'] = params.feedback- }- if (params.category !== undefined) {- body['category'] = params.category- }- const result = await context.api.request<Schemas.MCPAnalyticsSubmission>({- method: 'POST',- path: `/api/projects/${encodeURIComponent(String(projectId))}/mcp_analytics/feedback/`,- body,- })- return result- },-})-const McpMissingCapabilityReportSchema = () => {const McpAnalyticsMissingCapabilitiesCreateBody = orvalSchemas.McpAnalyticsMissingCapabilitiesCreateBody()return McpAnalyticsMissingCapabilitiesCreateBody.omit({@@ -705,7 +666,6 @@ export const GENERATED_TOOLS: Record<string, () => ToolBase<ZodObjectAny>> = {'mcp-analytics-sessions-generate-intent': mcpAnalyticsSessionsGenerateIntent,'mcp-analytics-sessions-list': mcpAnalyticsSessionsList,'mcp-analytics-sessions-tool-calls': mcpAnalyticsSessionsToolCalls,- 'mcp-feedback-submit': mcpFeedbackSubmit,'mcp-missing-capability-report': mcpMissingCapabilityReport,'query-mcp-harness-breakdown': createQueryWrapper({name: 'query-mcp-harness-breakdown',