Skip to content

: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.

chore(mcp): align the MCP handbook checklist with the skill (#111967)

Julian Bez45fb673728d9
diff --git a/.agents/skills/implementing-mcp-tools/SKILL.md b/.agents/skills/implementing-mcp-tools/SKILL.md
index 76847e0c05a0..86aef0a0c0b3 100644
--- a/.agents/skills/implementing-mcp-tools/SKILL.md
+++ b/.agents/skills/implementing-mcp-tools/SKILL.md
@@ -30,7 +30,8 @@ hogli build:openapi
# 5. Refresh the tool input schema snapshots (CI unit tests fail on a stale snapshot)
pnpm --filter=@posthog/mcp exec vitest run tests/unit/tool-schema-snapshots.test.ts -u
-# A tool behind a new `feature_flag` needs that flag added to the `featureFlags` map in the test first.
+# A tool behind a new `feature_flag` needs that flag in the test's `featureFlags` map, set to the value that shows the tool:
+# true for a plain gate, the variant string for a variant gate, a non-true value for a `disable` gate.
# 6. Only when the YAML uses ui_apps: regenerate the UI apps (CI checks they are current)
pnpm --filter=@posthog/mcp run generate:ui-apps
diff --git a/docs/published/handbook/engineering/ai/implementing-mcp-tools.md b/docs/published/handbook/engineering/ai/implementing-mcp-tools.md
index 75fa9135be73..62e57efb29e5 100644
--- a/docs/published/handbook/engineering/ai/implementing-mcp-tools.md
+++ b/docs/published/handbook/engineering/ai/implementing-mcp-tools.md
@@ -28,7 +28,15 @@ pnpm --filter=@posthog/mcp run scaffold-yaml -- --product your_product \
# 4. Generate handlers and schemas
hogli build:openapi
-# 5. Merge to master – CI builds and distributes automatically
+# 5. Refresh the tool input schema snapshots (CI unit tests fail on a stale snapshot)
+pnpm --filter=@posthog/mcp exec vitest run tests/unit/tool-schema-snapshots.test.ts -u
+# A tool behind a new `feature_flag` needs that flag in the test's `featureFlags` map, set to the value that shows the tool:
+# true for a plain gate, the variant string for a variant gate, a non-true value for a `disable` gate.
+
+# 6. Only when the YAML uses ui_apps: regenerate the UI apps (CI checks they are current)
+pnpm --filter=@posthog/mcp run generate:ui-apps
+
+# 7. Merge to master – CI builds and distributes automatically
```
## Tool design principles
diff --git a/products/posthog_ai/eval_harness/test/test_feature_flags_scorers.py b/products/posthog_ai/eval_harness/test/test_feature_flags_scorers.py
index 16772b7ee528..c046d53a22ff 100644
--- a/products/posthog_ai/eval_harness/test/test_feature_flags_scorers.py
+++ b/products/posthog_ai/eval_harness/test/test_feature_flags_scorers.py
@@ -97,7 +97,7 @@ def test_flag_lookup_tools_match_mcp_names_the_parser_normalizes(tool: str) -> N
def _declared_tools() -> dict[str, Any]:
- # tools.yaml may omit annotations (GET, DELETE and PATCH default), so read the generated
+ # tools.yaml may omit annotations (only GET and DELETE default), so read the generated
# definitions, which hold the resolved values for every enabled tool.
generated = json.loads(
(Path(settings.BASE_DIR) / "services/mcp/schema/generated-tool-definitions.json").read_text()