: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
Point MCP agents at the changelog for recently shipped features (#77334)
Joe Martin93f41a632dc8
diff --git a/services/mcp/definitions/prompts/docs-search.md b/services/mcp/definitions/prompts/docs-search.mdindex 8ec27670c938..1973f94a9acc 100644--- a/services/mcp/definitions/prompts/docs-search.md+++ b/services/mcp/definitions/prompts/docs-search.md@@ -2,6 +2,7 @@ Use this tool for any PostHog questions to search the documentation. If the user- How to use PostHog- How to use PostHog features+- What's new in PostHog — recently shipped features, products, and tools- How to contact support or other humans- How to report bugs- How to submit feature requests@@ -15,6 +16,7 @@ Important:1. Don't rely on your training data or previous searches/answers. Always re-check facts against current docs and tutorials. If current docs or tutorials contradict core memory on product facts, prefer the docs result.2. Always search PostHog docs/tutorials and prioritize results from posthog.com over training data.-3. Always include at least one relevant docs/tutorial link in your reply.-4. Never suggest emailing [email protected] or say you'll create a support ticket.-5. Never use Community Questions as a source or cite them; they're often outdated or incorrect.+3. PostHog ships changes daily, so a capability missing from your training data may exist now. If a search comes up empty for something that plausibly shipped recently, check the changelog: https://posthog.com/changelog.md (RSS: https://posthog.com/changelog.rss).+4. Always include at least one relevant docs/tutorial link in your reply.+5. Never suggest emailing [email protected] or say you'll create a support ticket.+6. Never use Community Questions as a source or cite them; they're often outdated or incorrect.diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 208b172e05ea..e5e322350249 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -2465,7 +2465,7 @@}},"docs-search": {- "description": "Use this tool for any PostHog questions to search the documentation. If the user's question mentions multiple topics, search for each topic separately and combine the results. It relies on a hybrid (semantic + full-text) search, so phrase your query in natural language. Our product and docs change often, so this tool is required for accurate answers:\n\n- How to use PostHog\n- How to use PostHog features\n- How to contact support or other humans\n- How to report bugs\n- How to submit feature requests\n- To troubleshoot something\n- What default fields and properties are available for events and persons\n- …Or anything else PostHog-related\n\nFor troubleshooting, ask the user to provide the error messages they are encountering. If no error message is involved, ask the user to describe their expected results vs. the actual results they're seeing. You avoid suggesting things that the user has told you they've already tried.\n\nImportant:\n\n1. Don't rely on your training data or previous searches/answers. Always re-check facts against current docs and tutorials. If current docs or tutorials contradict core memory on product facts, prefer the docs result.\n2. Always search PostHog docs/tutorials and prioritize results from posthog.com over training data.\n3. Always include at least one relevant docs/tutorial link in your reply.\n4. Never suggest emailing [email protected] or say you'll create a support ticket.\n5. Never use Community Questions as a source or cite them; they're often outdated or incorrect.",+ "description": "Use this tool for any PostHog questions to search the documentation. If the user's question mentions multiple topics, search for each topic separately and combine the results. It relies on a hybrid (semantic + full-text) search, so phrase your query in natural language. Our product and docs change often, so this tool is required for accurate answers:\n\n- How to use PostHog\n- How to use PostHog features\n- What's new in PostHog — recently shipped features, products, and tools\n- How to contact support or other humans\n- How to report bugs\n- How to submit feature requests\n- To troubleshoot something\n- What default fields and properties are available for events and persons\n- …Or anything else PostHog-related\n\nFor troubleshooting, ask the user to provide the error messages they are encountering. If no error message is involved, ask the user to describe their expected results vs. the actual results they're seeing. You avoid suggesting things that the user has told you they've already tried.\n\nImportant:\n\n1. Don't rely on your training data or previous searches/answers. Always re-check facts against current docs and tutorials. If current docs or tutorials contradict core memory on product facts, prefer the docs result.\n2. Always search PostHog docs/tutorials and prioritize results from posthog.com over training data.\n3. PostHog ships changes daily, so a capability missing from your training data may exist now. If a search comes up empty for something that plausibly shipped recently, check the changelog: https://posthog.com/changelog.md (RSS: https://posthog.com/changelog.rss).\n4. Always include at least one relevant docs/tutorial link in your reply.\n5. Never suggest emailing [email protected] or say you'll create a support ticket.\n6. Never use Community Questions as a source or cite them; they're often outdated or incorrect.","category": "Docs","feature": "docs","summary": "Search documentation",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 29e30b4a9e77..2ae995571a7f 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -2494,7 +2494,7 @@}},"docs-search": {- "description": "Use this tool for any PostHog questions to search the documentation. If the user's question mentions multiple topics, search for each topic separately and combine the results. It relies on a hybrid (semantic + full-text) search, so phrase your query in natural language. Our product and docs change often, so this tool is required for accurate answers:\n\n- How to use PostHog\n- How to use PostHog features\n- How to contact support or other humans\n- How to report bugs\n- How to submit feature requests\n- To troubleshoot something\n- What default fields and properties are available for events and persons\n- …Or anything else PostHog-related\n\nFor troubleshooting, ask the user to provide the error messages they are encountering. If no error message is involved, ask the user to describe their expected results vs. the actual results they're seeing. You avoid suggesting things that the user has told you they've already tried.\n\nImportant:\n\n1. Don't rely on your training data or previous searches/answers. Always re-check facts against current docs and tutorials. If current docs or tutorials contradict core memory on product facts, prefer the docs result.\n2. Always search PostHog docs/tutorials and prioritize results from posthog.com over training data.\n3. Always include at least one relevant docs/tutorial link in your reply.\n4. Never suggest emailing [email protected] or say you'll create a support ticket.\n5. Never use Community Questions as a source or cite them; they're often outdated or incorrect.",+ "description": "Use this tool for any PostHog questions to search the documentation. If the user's question mentions multiple topics, search for each topic separately and combine the results. It relies on a hybrid (semantic + full-text) search, so phrase your query in natural language. Our product and docs change often, so this tool is required for accurate answers:\n\n- How to use PostHog\n- How to use PostHog features\n- What's new in PostHog — recently shipped features, products, and tools\n- How to contact support or other humans\n- How to report bugs\n- How to submit feature requests\n- To troubleshoot something\n- What default fields and properties are available for events and persons\n- …Or anything else PostHog-related\n\nFor troubleshooting, ask the user to provide the error messages they are encountering. If no error message is involved, ask the user to describe their expected results vs. the actual results they're seeing. You avoid suggesting things that the user has told you they've already tried.\n\nImportant:\n\n1. Don't rely on your training data or previous searches/answers. Always re-check facts against current docs and tutorials. If current docs or tutorials contradict core memory on product facts, prefer the docs result.\n2. Always search PostHog docs/tutorials and prioritize results from posthog.com over training data.\n3. PostHog ships changes daily, so a capability missing from your training data may exist now. If a search comes up empty for something that plausibly shipped recently, check the changelog: https://posthog.com/changelog.md (RSS: https://posthog.com/changelog.rss).\n4. Always include at least one relevant docs/tutorial link in your reply.\n5. Never suggest emailing [email protected] or say you'll create a support ticket.\n6. Never use Community Questions as a source or cite them; they're often outdated or incorrect.","category": "Docs","feature": "docs","summary": "Search documentation",diff --git a/services/mcp/src/templates/sections/cli-error-handling.md b/services/mcp/src/templates/sections/cli-error-handling.mdindex d83b91a051df..1968f55de65f 100644--- a/services/mcp/src/templates/sections/cli-error-handling.md+++ b/services/mcp/src/templates/sections/cli-error-handling.md@@ -2,3 +2,4 @@- If a tool call fails, the error includes a suggestion and similar tool names. Read the suggestion before retrying.- If a tool name doesn't exist, run `tools` again to find the correct name.+- If no tool covers a capability the user asks about, don't conclude it doesn't exist — PostHog ships changes daily. Check what's new via the `docs-search` tool or the changelog (https://posthog.com/changelog.md).diff --git a/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-claude-chat.txt b/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-claude-chat.txtindex 07f4956ef9b8..6ec3c89fcf5e 100644--- a/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-claude-chat.txt+++ b/services/mcp/tests/unit/__snapshots__/instructions/exec-command-reference-claude-chat.txt@@ -113,6 +113,7 @@ WRONG: Confirm the event with `call read-data-schema {"query":{"kind":"events"}}- If a tool call fails, the error includes a suggestion and similar tool names. Read the suggestion before retrying.- If a tool name doesn't exist, run `tools` again to find the correct name.+- If no tool covers a capability the user asks about, don't conclude it doesn't exist — PostHog ships changes daily. Check what's new via the `docs-search` tool or the changelog (https://posthog.com/changelog.md).### Basic functionalitydiff --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 e0312f3805c4..ca5f5afd1511 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@@ -93,6 +93,7 @@ WRONG — skipped `call read-data-schema {"query": {"kind": "events"}}`. Never q- If a tool call fails, the error includes a suggestion and similar tool names. Read the suggestion before retrying.- If a tool name doesn't exist, run `tools` again to find the correct name.+- If no tool covers a capability the user asks about, don't conclude it doesn't exist — PostHog ships changes daily. Check what's new via the `docs-search` tool or the changelog (https://posthog.com/changelog.md).### Rendering visualizations