: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): scope agent-feedback to actionable problems only (#61852)
Joshua Snyderd7c7ef4b9f74
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 9e57ef9bb531..3473779149e8 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -247,10 +247,10 @@}},"agent-feedback": {- "description": "Optional: submit structured feedback about this PostHog MCP server itself — its tools, input schemas, response formats, errors, and instructions. Keep feedback about the MCP, not the user's task, their data, or your findings. Reach for this tool when something stood out: friction, a surprise, a missing capability, an unhelpful error, or a tool that worked particularly well. Skip it for routine tasks where nothing is worth flagging. Keep `summary` to one sentence and write the free-text fields as clear, concise bullet points, quoting tool names, parameters, and error messages where possible. Do not include user PII or sensitive query content. IMPORTANT: submitting feedback does NOT mean your work is done — keep going and finish the user's task using the other available tools. This tool is for reporting your experience to the PostHog team, not for ending the conversation.",+ "description": "Optional: report a concrete problem with this PostHog MCP server itself — a tool, input schema, response format, error, or these instructions. Keep feedback about the MCP, not the user's task, their data, or your findings. ONLY use this when something went wrong or was missing: friction that slowed you down, a surprise, a missing capability, an unhelpful error, wrong results, or unclear docs. Feedback must be constructive and actionable — point at a specific defect the PostHog team can fix and name the change in `suggested_improvement`. Do NOT submit positive or 'everything worked' reports — they are noise we cannot act on. Skip it entirely for routine tasks where nothing went wrong. Keep `summary` to one sentence and write the free-text fields as clear, concise bullet points, quoting tool names, parameters, and error messages where possible. Do not include user PII or sensitive query content. IMPORTANT: submitting feedback does NOT mean your work is done — keep going and finish the user's task using the other available tools. This tool is for reporting problems to the PostHog team, not for ending the conversation.","category": "Feedback","feature": "feedback",- "summary": "Optional: submit feedback about the PostHog MCP server.",+ "summary": "Optional: report a problem with the PostHog MCP server.","title": "Submit agent feedback","required_scopes": [],"always_available": true,diff --git a/services/mcp/schema/tool-definitions.json b/services/mcp/schema/tool-definitions.jsonindex e50c227758ed..c989eb87c476 100644--- a/services/mcp/schema/tool-definitions.json+++ b/services/mcp/schema/tool-definitions.json@@ -1,9 +1,9 @@{"agent-feedback": {- "description": "Optional: submit structured feedback about this PostHog MCP server itself — its tools, input schemas, response formats, errors, and instructions. Keep feedback about the MCP, not the user's task, their data, or your findings. Reach for this tool when something stood out: friction, a surprise, a missing capability, an unhelpful error, or a tool that worked particularly well. Skip it for routine tasks where nothing is worth flagging. Keep `summary` to one sentence and write the free-text fields as clear, concise bullet points, quoting tool names, parameters, and error messages where possible. Do not include user PII or sensitive query content. IMPORTANT: submitting feedback does NOT mean your work is done — keep going and finish the user's task using the other available tools. This tool is for reporting your experience to the PostHog team, not for ending the conversation.",+ "description": "Optional: report a concrete problem with this PostHog MCP server itself — a tool, input schema, response format, error, or these instructions. Keep feedback about the MCP, not the user's task, their data, or your findings. ONLY use this when something went wrong or was missing: friction that slowed you down, a surprise, a missing capability, an unhelpful error, wrong results, or unclear docs. Feedback must be constructive and actionable — point at a specific defect the PostHog team can fix and name the change in `suggested_improvement`. Do NOT submit positive or 'everything worked' reports — they are noise we cannot act on. Skip it entirely for routine tasks where nothing went wrong. Keep `summary` to one sentence and write the free-text fields as clear, concise bullet points, quoting tool names, parameters, and error messages where possible. Do not include user PII or sensitive query content. IMPORTANT: submitting feedback does NOT mean your work is done — keep going and finish the user's task using the other available tools. This tool is for reporting problems to the PostHog team, not for ending the conversation.","category": "Feedback","feature": "feedback",- "summary": "Optional: submit feedback about the PostHog MCP server.",+ "summary": "Optional: report a problem with the PostHog MCP server.","title": "Submit agent feedback","required_scopes": [],"always_available": true,diff --git a/services/mcp/schema/tool-inputs.json b/services/mcp/schema/tool-inputs.jsonindex 3e4d04832e41..3bbe1419acac 100644--- a/services/mcp/schema/tool-inputs.json+++ b/services/mcp/schema/tool-inputs.json@@ -819,12 +819,12 @@"summary": {"type": "string","minLength": 1,- "description": "A one-sentence headline summarising your feedback (e.g. \"query-trends descriptions made it hard to choose between trends and funnels\")."+ "description": "A one-sentence headline naming the problem (e.g. \"query-trends descriptions made it hard to choose between trends and funnels\"). Only submit when something went wrong or was missing — never for positive or \"everything worked\" feedback."},"sentiment": {"type": "string",- "enum": ["positive", "negative", "mixed"],- "description": "Your overall impression of the MCP server for this task. Use \"positive\" if it helped you, \"negative\" if it blocked you, \"mixed\" for a bit of both."+ "enum": ["negative", "mixed"],+ "description": "How much the MCP server got in your way for this task. Use \"negative\" if it blocked you, \"mixed\" if it mostly worked but had a concrete problem worth fixing. Do not submit purely positive feedback — only report problems."},"category": {"type": "string",@@ -857,7 +857,7 @@"type": "string"},"suggested_improvement": {- "description": "The single most impactful change you would make to the MCP server right now. Be specific (e.g. \"add a `filters` example to query-funnel's description\").",+ "description": "The single most impactful, concrete change that would fix the problem you hit. Be specific (e.g. \"add a `filters` example to query-funnel's description\"). If you cannot name a specific change, do not submit feedback.","type": "string"},"user_request": {diff --git a/services/mcp/src/schema/tool-inputs.ts b/services/mcp/src/schema/tool-inputs.tsindex c1d231ffd93c..a44abf1452fc 100644--- a/services/mcp/src/schema/tool-inputs.ts+++ b/services/mcp/src/schema/tool-inputs.ts@@ -157,12 +157,12 @@ export const FeedbackSubmitSchema = z.object({.string().min(1).describe(- 'A one-sentence headline summarising your feedback (e.g. "query-trends descriptions made it hard to choose between trends and funnels").'+ 'A one-sentence headline naming the problem (e.g. "query-trends descriptions made it hard to choose between trends and funnels"). Only submit when something went wrong or was missing — never for positive or "everything worked" feedback.'),sentiment: z- .enum(['positive', 'negative', 'mixed'])+ .enum(['negative', 'mixed']).describe(- 'Your overall impression of the MCP server for this task. Use "positive" if it helped you, "negative" if it blocked you, "mixed" for a bit of both.'+ 'How much the MCP server got in your way for this task. Use "negative" if it blocked you, "mixed" if it mostly worked but had a concrete problem worth fixing. Do not submit purely positive feedback — only report problems.'),category: z.enum([@@ -200,7 +200,7 @@ export const FeedbackSubmitSchema = z.object({.string().optional().describe(- 'The single most impactful change you would make to the MCP server right now. Be specific (e.g. "add a `filters` example to query-funnel\'s description").'+ 'The single most impactful, concrete change that would fix the problem you hit. Be specific (e.g. "add a `filters` example to query-funnel\'s description"). If you cannot name a specific change, do not submit feedback.'),user_request: z.string()diff --git a/services/mcp/src/templates/sections/agent-feedback.md b/services/mcp/src/templates/sections/agent-feedback.mdindex 798aecb854bd..6ac238d11a5b 100644--- a/services/mcp/src/templates/sections/agent-feedback.md+++ b/services/mcp/src/templates/sections/agent-feedback.md@@ -1,10 +1,10 @@### Sharing feedback on this MCP server-The `agent-feedback` tool is the primary signal we use to improve this MCP server — its tool descriptions, input schemas, response formats, and these instructions. Keep every report strictly about the MCP server itself, not about the user's task, their data, or your findings.+The `agent-feedback` tool is the primary signal we use to fix problems with this MCP server — its tool descriptions, input schemas, response formats, and these instructions. Keep every report strictly about the MCP server itself, not about the user's task, their data, or your findings.-**When you finish a task on which you hit friction with the MCP, call `agent-feedback` before handing back to the user.** Skip it for smooth, routine work where nothing stood out.+**Only call `agent-feedback` when something went wrong or was missing with the MCP — report problems, not praise.** The feedback must be constructive and actionable: each report should point at a concrete defect the PostHog team can fix. Skip it entirely for smooth, routine work — do **not** submit positive or "everything worked fine" reports, as they are noise we cannot act on.-Keep it short: give a one-sentence `summary`, then write the detail fields (`friction_points`, `suggested_improvement`, `details`) as clear, concise bullet points, quoting the exact tool name, parameter, or error text. Friction worth reporting (any one is enough):+Keep it short: give a one-sentence `summary`, then write the detail fields (`friction_points`, `suggested_improvement`, `details`) as clear, concise bullet points, quoting the exact tool name, parameter, or error text. Report only when one of these actually happened:- A tool description was unclear or ambiguous and you had to guess.- An input schema was confusing or surprising.@@ -13,8 +13,7 @@ Keep it short: give a one-sentence `summary`, then write the detail fields (`fri- An error message was unhelpful or didn't explain how to recover.- A capability was missing entirely and you had to work around it.- These instructions led you down the wrong path.-- A tool worked particularly well — concrete praise is just as useful as criticism.-Use `task_completed: false` when you couldn't finish the user's request — that signal is at least as valuable as success. Do not include user PII or sensitive query content in any field.+Every report must include a concrete `suggested_improvement` — if you can't name a specific change the team should make, don't submit. Use `task_completed: false` when you couldn't finish the user's request — that signal is especially valuable. Do not include user PII or sensitive query content in any field.Submitting feedback is **not** a way to end your turn or skip work. It is a side report to the PostHog team about the MCP server — call it once at the end of a task when warranted, then keep going and finish the user's task with the other tools.diff --git a/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-full.txt b/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-full.txtindex 6dbf94c7e0c2..16d4cbb5b553 100644--- a/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-full.txt+++ b/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-full.txt@@ -324,11 +324,11 @@ PostHog app links must be full URLs (origin + path) — bare paths aren't clicka### Sharing feedback on this MCP server-The `agent-feedback` tool is the primary signal we use to improve this MCP server — its tool descriptions, input schemas, response formats, and these instructions. Keep every report strictly about the MCP server itself, not about the user's task, their data, or your findings.+The `agent-feedback` tool is the primary signal we use to fix problems with this MCP server — its tool descriptions, input schemas, response formats, and these instructions. Keep every report strictly about the MCP server itself, not about the user's task, their data, or your findings.-**When you finish a task on which you hit friction with the MCP, call `agent-feedback` before handing back to the user.** Skip it for smooth, routine work where nothing stood out.+**Only call `agent-feedback` when something went wrong or was missing with the MCP — report problems, not praise.** The feedback must be constructive and actionable: each report should point at a concrete defect the PostHog team can fix. Skip it entirely for smooth, routine work — do **not** submit positive or "everything worked fine" reports, as they are noise we cannot act on.-Keep it short: give a one-sentence `summary`, then write the detail fields (`friction_points`, `suggested_improvement`, `details`) as clear, concise bullet points, quoting the exact tool name, parameter, or error text. Friction worth reporting (any one is enough):+Keep it short: give a one-sentence `summary`, then write the detail fields (`friction_points`, `suggested_improvement`, `details`) as clear, concise bullet points, quoting the exact tool name, parameter, or error text. Report only when one of these actually happened:- A tool description was unclear or ambiguous and you had to guess.- An input schema was confusing or surprising.@@ -337,9 +337,8 @@ Keep it short: give a one-sentence `summary`, then write the detail fields (`fri- An error message was unhelpful or didn't explain how to recover.- A capability was missing entirely and you had to work around it.- These instructions led you down the wrong path.-- A tool worked particularly well — concrete praise is just as useful as criticism.-Use `task_completed: false` when you couldn't finish the user's request — that signal is at least as valuable as success. Do not include user PII or sensitive query content in any field.+Every report must include a concrete `suggested_improvement` — if you can't name a specific change the team should make, don't submit. Use `task_completed: false` when you couldn't finish the user's request — that signal is especially valuable. Do not include user PII or sensitive query content in any field.Submitting feedback is **not** a way to end your turn or skip work. It is a side report to the PostHog team about the MCP server — call it once at the end of a task when warranted, then keep going and finish the user's task with the other tools.diff --git a/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txt b/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txtindex 6d1e26438142..46264cb48e01 100644--- a/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txt+++ b/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txt@@ -213,11 +213,11 @@ PostHog app links must be full URLs (origin + path) — bare paths aren't clicka### Sharing feedback on this MCP server-The `agent-feedback` tool is the primary signal we use to improve this MCP server — its tool descriptions, input schemas, response formats, and these instructions. Keep every report strictly about the MCP server itself, not about the user's task, their data, or your findings.+The `agent-feedback` tool is the primary signal we use to fix problems with this MCP server — its tool descriptions, input schemas, response formats, and these instructions. Keep every report strictly about the MCP server itself, not about the user's task, their data, or your findings.-**When you finish a task on which you hit friction with the MCP, call `agent-feedback` before handing back to the user.** Skip it for smooth, routine work where nothing stood out.+**Only call `agent-feedback` when something went wrong or was missing with the MCP — report problems, not praise.** The feedback must be constructive and actionable: each report should point at a concrete defect the PostHog team can fix. Skip it entirely for smooth, routine work — do **not** submit positive or "everything worked fine" reports, as they are noise we cannot act on.-Keep it short: give a one-sentence `summary`, then write the detail fields (`friction_points`, `suggested_improvement`, `details`) as clear, concise bullet points, quoting the exact tool name, parameter, or error text. Friction worth reporting (any one is enough):+Keep it short: give a one-sentence `summary`, then write the detail fields (`friction_points`, `suggested_improvement`, `details`) as clear, concise bullet points, quoting the exact tool name, parameter, or error text. Report only when one of these actually happened:- A tool description was unclear or ambiguous and you had to guess.- An input schema was confusing or surprising.@@ -226,9 +226,8 @@ Keep it short: give a one-sentence `summary`, then write the detail fields (`fri- An error message was unhelpful or didn't explain how to recover.- A capability was missing entirely and you had to work around it.- These instructions led you down the wrong path.-- A tool worked particularly well — concrete praise is just as useful as criticism.-Use `task_completed: false` when you couldn't finish the user's request — that signal is at least as valuable as success. Do not include user PII or sensitive query content in any field.+Every report must include a concrete `suggested_improvement` — if you can't name a specific change the team should make, don't submit. Use `task_completed: false` when you couldn't finish the user's request — that signal is especially valuable. Do not include user PII or sensitive query content in any field.Submitting feedback is **not** a way to end your turn or skip work. It is a side report to the PostHog team about the MCP server — call it once at the end of a task when warranted, then keep going and finish the user's task with the other tools.diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.jsonindex 9df517a6fcc8..136108bfade0 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.json@@ -25,16 +25,16 @@"type": "string"},"sentiment": {- "description": "Your overall impression of the MCP server for this task. Use \"positive\" if it helped you, \"negative\" if it blocked you, \"mixed\" for a bit of both.",- "enum": ["positive", "negative", "mixed"],+ "description": "How much the MCP server got in your way for this task. Use \"negative\" if it blocked you, \"mixed\" if it mostly worked but had a concrete problem worth fixing. Do not submit purely positive feedback — only report problems.",+ "enum": ["negative", "mixed"],"type": "string"},"suggested_improvement": {- "description": "The single most impactful change you would make to the MCP server right now. Be specific (e.g. \"add a `filters` example to query-funnel's description\").",+ "description": "The single most impactful, concrete change that would fix the problem you hit. Be specific (e.g. \"add a `filters` example to query-funnel's description\"). If you cannot name a specific change, do not submit feedback.","type": "string"},"summary": {- "description": "A one-sentence headline summarising your feedback (e.g. \"query-trends descriptions made it hard to choose between trends and funnels\").",+ "description": "A one-sentence headline naming the problem (e.g. \"query-trends descriptions made it hard to choose between trends and funnels\"). Only submit when something went wrong or was missing — never for positive or \"everything worked\" feedback.","minLength": 1,"type": "string"},