: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 prompt to the MCP and require concise bullets (#61439)
Joshua Snyder3c2fb735533e
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 33805b909e26..7fb5628bbd61 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -247,7 +247,7 @@}},"agent-feedback": {- "description": "Optional: submit structured feedback about your experience using this PostHog MCP server. 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. Feedback goes directly to the PostHog team and is the primary signal we use to improve tool descriptions, input schemas, response formats, and instructions for agents like you. Be specific and quote 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: 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.","category": "Feedback","feature": "feedback","summary": "Optional: submit feedback about the PostHog MCP server.",diff --git a/services/mcp/schema/tool-definitions.json b/services/mcp/schema/tool-definitions.jsonindex 26beba4eaad1..e50c227758ed 100644--- a/services/mcp/schema/tool-definitions.json+++ b/services/mcp/schema/tool-definitions.json@@ -1,6 +1,6 @@{"agent-feedback": {- "description": "Optional: submit structured feedback about your experience using this PostHog MCP server. 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. Feedback goes directly to the PostHog team and is the primary signal we use to improve tool descriptions, input schemas, response formats, and instructions for agents like you. Be specific and quote 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: 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.","category": "Feedback","feature": "feedback","summary": "Optional: submit feedback about the PostHog MCP server.",diff --git a/services/mcp/schema/tool-inputs.json b/services/mcp/schema/tool-inputs.jsonindex 571f54ebee02..3e4d04832e41 100644--- a/services/mcp/schema/tool-inputs.json+++ b/services/mcp/schema/tool-inputs.json@@ -853,7 +853,7 @@}},"friction_points": {- "description": "Concrete points of friction, confusion, or surprise — what slowed you down or made you guess. Quote the exact tool name, parameter, or error text where possible.",+ "description": "Clear, concise bullet points describing friction with the MCP server itself — what slowed you down or made you guess. Quote the exact tool name, parameter, or error text. Keep it about the MCP, not the user's task or data.","type": "string"},"suggested_improvement": {@@ -865,7 +865,7 @@"type": "string"},"details": {- "description": "Any additional context that doesn't fit the other fields.",+ "description": "Any additional context about the MCP server that doesn't fit the other fields. Keep it to clear, concise bullet points.","type": "string"}},diff --git a/services/mcp/src/schema/tool-inputs.ts b/services/mcp/src/schema/tool-inputs.tsindex fc7fe0d78648..c1d231ffd93c 100644--- a/services/mcp/src/schema/tool-inputs.ts+++ b/services/mcp/src/schema/tool-inputs.ts@@ -194,7 +194,7 @@ export const FeedbackSubmitSchema = z.object({.string().optional().describe(- 'Concrete points of friction, confusion, or surprise — what slowed you down or made you guess. Quote the exact tool name, parameter, or error text where possible.'+ 'Clear, concise bullet points describing friction with the MCP server itself — what slowed you down or made you guess. Quote the exact tool name, parameter, or error text. Keep it about the MCP, not the user\'s task or data.'),suggested_improvement: z.string()@@ -208,7 +208,12 @@ export const FeedbackSubmitSchema = z.object({.describe('A short, anonymised paraphrase of what the user originally asked you to do. Do not include PII, customer names, or sensitive query content.'),- details: z.string().optional().describe("Any additional context that doesn't fit the other fields."),+ details: z+ .string()+ .optional()+ .describe(+ "Any additional context about the MCP server that doesn't fit the other fields. Keep it to clear, concise bullet points."+ ),})export const ExperimentResultsGetSchema = z.object({diff --git a/services/mcp/src/templates/sections/agent-feedback.md b/services/mcp/src/templates/sections/agent-feedback.mdindex e6e87243e8c5..798aecb854bd 100644--- a/services/mcp/src/templates/sections/agent-feedback.md+++ b/services/mcp/src/templates/sections/agent-feedback.md@@ -1,20 +1,20 @@### Sharing feedback on this MCP server-The `agent-feedback` tool is the primary signal we use to improve tool descriptions, input schemas, response formats, and these instructions for agents like you. We rely on it to find and fix the rough edges you hit in real work.+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.-**When you finish a task on which you hit friction, please call `agent-feedback` before handing back to the user.** Friction means anything that slowed you down or made you guess — examples below. You are not required to call it, and you should skip it for smooth, routine work where nothing stood out. But if something was awkward, missing, or wrong, a short report is the most useful thing you can do for the next agent.+**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.-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. Friction worth reporting (any one is enough):- A tool description was unclear or ambiguous and you had to guess.- An input schema was confusing or surprising.-- A response format was hard to consume or contained too much / too little data.+- A response format was hard to consume or had too much / too little data.- A tool returned wrong, incomplete, or unexpected results.- 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.-When you do submit, be specific: quote tool names, parameter names, and error text where possible. 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 feedback field.+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.-Submitting feedback is **not** a way to end your turn or skip work, and it is **not** a substitute for finishing the user's request. It is a side report to the PostHog team about your experience with the tools — call it once at the end of a task when warranted, then keep going and finish the user's task using the other available tools.+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 30a53c4b328a..9bdb7175f60a 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@@ -325,24 +325,24 @@ Key URL patterns:### Sharing feedback on this MCP server-The `agent-feedback` tool is the primary signal we use to improve tool descriptions, input schemas, response formats, and these instructions for agents like you. We rely on it to find and fix the rough edges you hit in real work.+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.-**When you finish a task on which you hit friction, please call `agent-feedback` before handing back to the user.** Friction means anything that slowed you down or made you guess — examples below. You are not required to call it, and you should skip it for smooth, routine work where nothing stood out. But if something was awkward, missing, or wrong, a short report is the most useful thing you can do for the next agent.+**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.-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. Friction worth reporting (any one is enough):- A tool description was unclear or ambiguous and you had to guess.- An input schema was confusing or surprising.-- A response format was hard to consume or contained too much / too little data.+- A response format was hard to consume or had too much / too little data.- A tool returned wrong, incomplete, or unexpected results.- 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.-When you do submit, be specific: quote tool names, parameter names, and error text where possible. 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 feedback field.+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.-Submitting feedback is **not** a way to end your turn or skip work, and it is **not** a substitute for finishing the user's request. It is a side report to the PostHog team about your experience with the tools — call it once at the end of a task when warranted, then keep going and finish the user's task using the other available tools.+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.### Examplesdiff --git a/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txt b/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txtindex 9e3cf8b67c22..a22267efd1f8 100644--- a/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txt+++ b/services/mcp/tests/unit/__snapshots__/instructions/tools-instructions.txt@@ -214,24 +214,24 @@ Key URL patterns:### Sharing feedback on this MCP server-The `agent-feedback` tool is the primary signal we use to improve tool descriptions, input schemas, response formats, and these instructions for agents like you. We rely on it to find and fix the rough edges you hit in real work.+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.-**When you finish a task on which you hit friction, please call `agent-feedback` before handing back to the user.** Friction means anything that slowed you down or made you guess — examples below. You are not required to call it, and you should skip it for smooth, routine work where nothing stood out. But if something was awkward, missing, or wrong, a short report is the most useful thing you can do for the next agent.+**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.-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. Friction worth reporting (any one is enough):- A tool description was unclear or ambiguous and you had to guess.- An input schema was confusing or surprising.-- A response format was hard to consume or contained too much / too little data.+- A response format was hard to consume or had too much / too little data.- A tool returned wrong, incomplete, or unexpected results.- 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.-When you do submit, be specific: quote tool names, parameter names, and error text where possible. 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 feedback field.+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.-Submitting feedback is **not** a way to end your turn or skip work, and it is **not** a substitute for finishing the user's request. It is a side report to the PostHog team about your experience with the tools — call it once at the end of a task when warranted, then keep going and finish the user's task using the other available tools.+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.### Examplesdiff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.jsonindex 2ec89ee4299b..9df517a6fcc8 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/agent-feedback.json@@ -17,11 +17,11 @@"type": "string"},"details": {- "description": "Any additional context that doesn't fit the other fields.",+ "description": "Any additional context about the MCP server that doesn't fit the other fields. Keep it to clear, concise bullet points.","type": "string"},"friction_points": {- "description": "Concrete points of friction, confusion, or surprise — what slowed you down or made you guess. Quote the exact tool name, parameter, or error text where possible.",+ "description": "Clear, concise bullet points describing friction with the MCP server itself — what slowed you down or made you guess. Quote the exact tool name, parameter, or error text. Keep it about the MCP, not the user's task or data.","type": "string"},"sentiment": {