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.

feat(signals): add activity summary MCP tools behind the enrollment gate (#122216)

posthog[bot]919bdca53f11
diff --git a/posthog/test/repo_invariants/test_pagination_contract.py b/posthog/test/repo_invariants/test_pagination_contract.py
index 949a1481810a..20e2f64b1554 100644
--- a/posthog/test/repo_invariants/test_pagination_contract.py
+++ b/posthog/test/repo_invariants/test_pagination_contract.py
@@ -221,6 +221,8 @@ EXISTING_CUSTOM_LIST_VIEWSETS = {
"products.review_hog.backend.presentation.views.resolution.ReviewResolutionConfigViewSet",
"products.review_hog.backend.presentation.views.reviews.ReviewRecentReviewsViewSet",
"products.review_hog.backend.presentation.views.validators.ReviewValidatorConfigViewSet",
+ # Returns the requesting user's own summary as a single document, so there is nothing to paginate.
+ "products.signals.backend.presentation.activity_summary.ActivitySummaryViewSet",
# Counts and hover details must use the same complete seven-day window.
"products.signals.backend.presentation.inbox_summary.InboxSummaryViewSet",
# Returns one team's onboarding state as a single document, so there is nothing to paginate.
diff --git a/products/signals/backend/activity_summary/queue.py b/products/signals/backend/activity_summary/queue.py
index 1ed5def686db..ad5d7499c20c 100644
--- a/products/signals/backend/activity_summary/queue.py
+++ b/products/signals/backend/activity_summary/queue.py
@@ -8,6 +8,7 @@ rules and `min_units`, and backs a pair off when it skips, so the pair leaves th
"""
import math
+import uuid
import datetime
from collections.abc import Callable
from typing import Any
@@ -169,6 +170,26 @@ def enrolled_team_ids(config: ActivitySummaryConfig) -> list[int]:
return list(teams.exclude(id__in=config.skip_team_ids).values_list("id", flat=True))
+def is_team_enrolled(config: ActivitySummaryConfig, team: Team) -> bool:
+ """The single-team form of `enrolled_team_ids`. A disabled config enrolls no team."""
+ if not config.enabled or team.id in config.skip_team_ids:
+ return False
+ if team.organization.is_ai_data_processing_approved is not True:
+ return False
+ return config.enroll_all_approved or team.organization_id in _listed_organization_ids(config)
+
+
+def _listed_organization_ids(config: ActivitySummaryConfig) -> set[uuid.UUID]:
+ # The same parse as the `organization_id__in` filter, so an id in another UUID format still matches.
+ listed: set[uuid.UUID] = set()
+ for organization_id in config.organization_ids:
+ try:
+ listed.add(uuid.UUID(organization_id))
+ except ValueError:
+ continue
+ return listed
+
+
def _add(pending: _Pending, pair: ActivitySummaryPair, units: int, at: datetime.datetime) -> None:
current = pending.get(pair)
if current is None:
diff --git a/products/signals/backend/activity_summary/read.py b/products/signals/backend/activity_summary/read.py
new file mode 100644
index 000000000000..8826225de6ad
--- /dev/null
+++ b/products/signals/backend/activity_summary/read.py
@@ -0,0 +1,143 @@
+"""Read a user's own activity summary and its versions, for the organizations the flag payload enrolls.
+
+Every read returns `None` when the team is not enrolled, so the caller can answer as if the feature did
+not exist. The stored JSON comes from older prompt versions too, so each field is read defensively.
+"""
+
+import datetime
+from typing import Any
+
+from django.db import models
+
+from posthog.dataclasses import frozen
+from posthog.models import Team
+
+from products.signals.backend.activity_summary.config import ActivitySummaryConfig, read_config
+from products.signals.backend.activity_summary.logic import is_stale
+from products.signals.backend.activity_summary.queue import is_team_enrolled
+from products.signals.backend.models import UserActivitySummary, UserActivitySummaryVersion
+
+DEFAULT_VERSIONS_LIMIT = 5
+
+
+class ActivitySummaryStatus(models.TextChoices):
+ READY = "ready"
+ # No row, or no update succeeded yet.
+ NOT_READY = "not_ready"
+
+
+@frozen
+class ActivitySummaryFocusArea:
+ topic: str
+ strength: str | None
+ last_seen: str | None
+
+
+@frozen
+class ActivitySummaryView:
+ status: ActivitySummaryStatus
+ headline: str | None = None
+ profile: str | None = None
+ focus_areas: tuple[ActivitySummaryFocusArea, ...] = ()
+ products: tuple[str, ...] = ()
+ recent_shift: str | None = None
+ generated_at: datetime.datetime | None = None
+ version: int = 0
+ prompt_version: int | None = None
+ stale: bool = False
+
+
+@frozen
+class ActivitySummaryVersionView:
+ version: int
+ generated_at: datetime.datetime
+ prompt_version: int
+ headline: str | None
+ recent_shift: str | None
+ focus_areas: tuple[ActivitySummaryFocusArea, ...]
+ # Only a read of one version carries the profile, so a list stays small.
+ profile: str | None = None
+
+
+def _text(value: Any) -> str | None:
+ return value if isinstance(value, str) and value else None
+
+
+def _headline(summary: dict[str, Any]) -> str | None:
+ # A summary stored before prompt version 3 has a `summary` and no `headline`.
+ return _text(summary.get("headline")) or _text(summary.get("summary"))
+
+
+def _focus_areas(value: Any) -> tuple[ActivitySummaryFocusArea, ...]:
+ if not isinstance(value, list):
+ return ()
+ return tuple(
+ ActivitySummaryFocusArea(
+ topic=topic, strength=_text(item.get("strength")), last_seen=_text(item.get("last_seen"))
+ )
+ for item in value
+ if isinstance(item, dict) and (topic := _text(item.get("topic"))) is not None
+ )
+
+
+def _products(value: Any) -> tuple[str, ...]:
+ return tuple(item for item in value if _text(item) is not None) if isinstance(value, list) else ()
+
+
+def _readable_config(team: Team) -> ActivitySummaryConfig | None:
+ config = read_config()
+ return config if is_team_enrolled(config, team) else None
+
+
+def get_summary(team: Team, user_id: int) -> ActivitySummaryView | None:
+ """The user's current summary. A failed later update keeps the last good summary, so it is still ready."""
+ config = _readable_config(team)
+ if config is None:
+ return None
+ row = UserActivitySummary.objects.for_team(team.id).filter(user_id=user_id).first()
+ if row is None or not isinstance(row.summary, dict) or row.generated_at is None:
+ return ActivitySummaryView(status=ActivitySummaryStatus.NOT_READY)
+ return ActivitySummaryView(
+ status=ActivitySummaryStatus.READY,
+ headline=_headline(row.summary),
+ profile=_text(row.summary.get("profile")),
+ focus_areas=_focus_areas(row.summary.get("focus_areas")),
+ products=_products(row.summary.get("products")),
+ recent_shift=_text(row.summary.get("recent_shift")),
+ generated_at=row.generated_at,
+ version=row.version,
+ prompt_version=row.prompt_version,
+ stale=is_stale(row, config.rebuild_before),
+ )
+
+
+def _version_view(row: UserActivitySummaryVersion, *, with_profile: bool) -> ActivitySummaryVersionView:
+ summary = row.summary if isinstance(row.summary, dict) else {}
+ return ActivitySummaryVersionView(
+ version=row.version,
+ generated_at=row.generated_at,
+ prompt_version=row.prompt_version,
+ headline=_headline(summary),
+ recent_shift=_text(summary.get("recent_shift")),
+ focus_areas=_focus_areas(summary.get("focus_areas")),
+ profile=_text(summary.get("profile")) if with_profile else None,
+ )
+
+
+def list_versions(
+ team: Team, user_id: int, *, limit: int = DEFAULT_VERSIONS_LIMIT, version: int | None = None
+) -> list[ActivitySummaryVersionView] | None:
+ """The user's summary versions, newest first, cut to `limit` and the configured `max_versions`.
+
+ With `version`, the list holds only that version, with its profile, or nothing when it does not exist.
+ """
+ config = _readable_config(team)
+ if config is None:
+ return None
+ rows = UserActivitySummaryVersion.objects.for_team(team.id).filter(summary_row__user_id=user_id)
+ if version is not None:
+ return [_version_view(row, with_profile=True) for row in rows.filter(version=version)[:1]]
+ return [
+ _version_view(row, with_profile=False)
+ for row in rows.order_by("-version")[: max(1, min(limit, config.max_versions))]
+ ]
diff --git a/products/signals/backend/facade/api.py b/products/signals/backend/facade/api.py
index 645a36b01e76..5da2629d4718 100644
--- a/products/signals/backend/facade/api.py
+++ b/products/signals/backend/facade/api.py
@@ -29,6 +29,12 @@ from posthog.sync import database_sync_to_async
from posthog.temporal.common.client import async_connect
from products.access_control.backend.facade.user_access_control import UserAccessControl
+from products.signals.backend.activity_summary import read as activity_summary_read
+from products.signals.backend.activity_summary.read import (
+ ActivitySummaryFocusArea as ActivitySummaryFocusArea,
+ ActivitySummaryVersionView as ActivitySummaryVersionView,
+ ActivitySummaryView as ActivitySummaryView,
+)
from products.signals.backend.artefact_schemas import (
# Re-exported so the Slack mention handler can label the task it starts from a report's
# notification thread without naming the relationship vocabulary itself.
@@ -199,6 +205,18 @@ def get_inbox_summary(*, team_id: int, user: object | None = None, service_auth:
)
+def get_activity_summary(*, team: Team, user_id: int) -> ActivitySummaryView | None:
+ """The user's own activity summary in this project, or None when the flag payload does not enroll the team."""
+ return activity_summary_read.get_summary(team, user_id)
+
+
+def list_activity_summary_versions(
+ *, team: Team, user_id: int, limit: int, version: int | None = None
+) -> list[ActivitySummaryVersionView] | None:
+ """The user's own summary versions, newest first, or None when the flag payload does not enroll the team."""
+ return activity_summary_read.list_versions(team, user_id, limit=limit, version=version)
+
+
@frozen
class ScoutTrialSkill:
name: str
diff --git a/products/signals/backend/presentation/activity_summary.py b/products/signals/backend/presentation/activity_summary.py
new file mode 100644
index 000000000000..430affda35ac
--- /dev/null
+++ b/products/signals/backend/presentation/activity_summary.py
@@ -0,0 +1,164 @@
+from dataclasses import asdict
+from typing import Any
+
+from drf_spectacular.utils import OpenApiResponse, extend_schema_serializer
+from rest_framework import serializers, viewsets
+from rest_framework.decorators import action
+from rest_framework.exceptions import NotFound, PermissionDenied
+from rest_framework.permissions import IsAuthenticated
+from rest_framework.request import Request
+from rest_framework.response import Response
+
+from posthog.api.mixins import ValidatedRequest, validated_request
+from posthog.api.routing import TeamAndOrgViewSetMixin
+from posthog.auth import (
+ OAuthAccessTokenAuthentication,
+ PersonalAPIKeyAuthentication,
+ SessionAuthentication,
+ is_mcp_request,
+)
+from posthog.event_usage import report_user_action
+from posthog.models import User
+from posthog.permissions import APIScopePermission, is_service_auth
+
+from products.signals.backend.activity_summary.read import DEFAULT_VERSIONS_LIMIT, ActivitySummaryStatus
+from products.signals.backend.facade import api as signals_facade
+
+READ_EVENT = "activity summary read"
+
+
+class ActivitySummaryFocusAreaSerializer(serializers.Serializer):
+ topic = serializers.CharField(help_text="A main thread of the user's work, in the words of their activity.")
+ strength = serializers.CharField(
+ allow_null=True, help_text="How much of the recent activity is about this thread: high, medium or low."
+ )
+ last_seen = serializers.CharField(
+ allow_null=True, help_text="The last day with activity on this thread, as YYYY-MM-DD."
+ )
+
+
+@extend_schema_serializer(many=False)
+class ActivitySummarySerializer(serializers.Serializer):
+ status = serializers.ChoiceField(
+ choices=ActivitySummaryStatus.choices,
+ help_text="`ready` when a summary exists. `not_ready` when no summary exists yet, which is normal for new or quiet users.",
+ )
+ headline = serializers.CharField(allow_null=True, help_text="Two or three sentences that capture the profile.")
+ profile = serializers.CharField(
+ allow_null=True,
+ help_text="A one-page markdown profile of the user's work in this project. Null on summaries from before profiles existed.",
+ )
+ focus_areas = ActivitySummaryFocusAreaSerializer(many=True, help_text="The main threads of the user's work.")
+ products = serializers.ListField(
+ child=serializers.CharField(), help_text="The PostHog products the user works with, by name."
+ )
+ recent_shift = serializers.CharField(
+ allow_null=True, help_text="What changed since the version before this one, or null when nothing changed."
+ )
+ generated_at = serializers.DateTimeField(allow_null=True, help_text="When this version of the summary was written.")
+ version = serializers.IntegerField(help_text="The number of this version of the summary. 0 before the first.")
+ prompt_version = serializers.IntegerField(
+ allow_null=True, help_text="The version of the prompt that wrote this summary."
+ )
+ stale = serializers.BooleanField(help_text="True when a newer version will replace this summary soon.")
+
+
+class ActivitySummaryVersionSerializer(serializers.Serializer):
+ version = serializers.IntegerField(help_text="The number of this version. Higher numbers are newer.")
+ generated_at = serializers.DateTimeField(help_text="When this version was written.")
+ prompt_version = serializers.IntegerField(help_text="The version of the prompt that wrote this version.")
+ headline = serializers.CharField(allow_null=True, help_text="Two or three sentences that capture the profile.")
+ recent_shift = serializers.CharField(
+ allow_null=True, help_text="What changed since the version before this one, or null when nothing changed."
+ )
+ focus_areas = ActivitySummaryFocusAreaSerializer(many=True, help_text="The main threads of the user's work.")
+ profile = serializers.CharField(
+ allow_null=True,
+ help_text="The one-page markdown profile. Set only when the request asks for one version with `version`.",
+ )
+
+
+class ActivitySummaryVersionsQuerySerializer(serializers.Serializer):
+ limit = serializers.IntegerField(
+ min_value=1,
+ default=DEFAULT_VERSIONS_LIMIT,
+ help_text="The most versions to return, newest first. Capped at the number of versions kept.",
+ )
+ version = serializers.IntegerField(
+ min_value=1,
+ required=False,
+ help_text="Return only this version, with its full profile. Returns 404 when the version does not exist.",
+ )
+
+
+class ActivitySummaryViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
+ serializer_class = ActivitySummarySerializer
+ authentication_classes = [SessionAuthentication, PersonalAPIKeyAuthentication, OAuthAccessTokenAuthentication]
+ permission_classes = [IsAuthenticated, APIScopePermission]
+ scope_object = "task"
+ requires_resource_level_access = True
+ pagination_class = None
+
+ def _own_user_id(self, request: Request) -> int:
+ # A summary describes one person, so only that person's own credentials can read it.
+ if is_service_auth(request) or not isinstance(request.user, User):
+ raise PermissionDenied("Activity summaries can only be read by the user they describe.")
+ return request.user.id
+
+ def _capture_read(self, request: Request, endpoint: str, status: str, **properties: Any) -> None:
+ report_user_action(
+ request.user,
+ READ_EVENT,
+ properties={"endpoint": endpoint, "status": status, "via_mcp": is_mcp_request(request), **properties},
+ team=self.team,
+ request=request,
+ )
+
+ @validated_request(
+ responses={200: OpenApiResponse(response=ActivitySummarySerializer)},
+ summary="Get your activity summary",
+ )
+ def list(self, request: Request, **kwargs: object) -> Response:
+ summary = signals_facade.get_activity_summary(team=self.team, user_id=self._own_user_id(request))
+ if summary is None:
+ self._capture_read(request, "get", "not_enrolled")
+ raise NotFound()
+ self._capture_read(
+ request,
+ "get",
+ summary.status,
+ version=summary.version,
+ prompt_version=summary.prompt_version,
+ stale=summary.stale,
+ )
+ return Response(ActivitySummarySerializer(asdict(summary)).data)
+
+ @validated_request(
+ query_serializer=ActivitySummaryVersionsQuerySerializer,
+ responses={200: OpenApiResponse(response=ActivitySummaryVersionSerializer(many=True))},
+ summary="List your activity summary versions",
+ )
+ @action(detail=False, methods=["GET"], required_scopes=["task:read"])
+ def versions(self, request: ValidatedRequest, **kwargs: object) -> Response:
+ user_id = self._own_user_id(request)
+ query = request.validated_query_data
+ requested_version = query.get("version")
+ versions = signals_facade.list_activity_summary_versions(
+ team=self.team, user_id=user_id, limit=query["limit"], version=requested_version
+ )
+ if versions is None:
+ self._capture_read(request, "versions", "not_enrolled")
+ raise NotFound()
+ if requested_version is not None and not versions:
+ self._capture_read(request, "versions", "not_found", version=requested_version)
+ raise NotFound()
+ newest = versions[0] if versions else None
+ self._capture_read(
+ request,
+ "versions",
+ ActivitySummaryStatus.READY if newest else ActivitySummaryStatus.NOT_READY,
+ version=newest.version if newest else None,
+ prompt_version=newest.prompt_version if newest else None,
+ count=len(versions),
+ )
+ return Response(ActivitySummaryVersionSerializer([asdict(version) for version in versions], many=True).data)
diff --git a/products/signals/backend/routes.py b/products/signals/backend/routes.py
index 910b2dfb7a2f..368fe33cb9af 100644
--- a/products/signals/backend/routes.py
+++ b/products/signals/backend/routes.py
@@ -1,6 +1,7 @@
from posthog.api.routing import RouterRegistry
import products.signals.backend.views as signals
+from products.signals.backend.presentation.activity_summary import ActivitySummaryViewSet
from products.signals.backend.presentation.inbox_summary import InboxSummaryViewSet
from products.signals.backend.presentation.onboarding import InboxOnboardingViewSet
from products.signals.backend.presentation.scout_rubrics import SignalScoutRubricViewSet
@@ -24,6 +25,9 @@ def register_routes(routers: RouterRegistry) -> None:
routers.projects.register(
r"signals/inbox_summary", InboxSummaryViewSet, "project_signals_inbox_summary", ["team_id"]
)
+ routers.projects.register(
+ r"signals/activity_summary", ActivitySummaryViewSet, "project_signals_activity_summary", ["team_id"]
+ )
routers.projects.register(
r"signals/scout/rubrics", SignalScoutRubricViewSet, "project_signals_scout_rubrics", ["team_id"]
)
diff --git a/products/signals/backend/test/test_activity_summary_api.py b/products/signals/backend/test/test_activity_summary_api.py
new file mode 100644
index 000000000000..4302c4cac617
--- /dev/null
+++ b/products/signals/backend/test/test_activity_summary_api.py
@@ -0,0 +1,164 @@
+import datetime
+import dataclasses
+from typing import Any
+
+import time_machine
+from posthog.test.base import APIBaseTest
+from unittest.mock import patch
+
+from parameterized import parameterized
+
+from posthog.models import User
+
+from products.signals.backend.activity_summary.config import ActivitySummaryConfig
+from products.signals.backend.activity_summary.prompt import PROMPT_VERSION
+from products.signals.backend.activity_summary.render import RENDER_VERSION
+from products.signals.backend.models import UserActivitySummary, UserActivitySummaryVersion
+
+NOW = datetime.datetime(2026, 10, 19, 12, tzinfo=datetime.UTC)
+SUMMARY = {
+ "profile": "## Funnels\n- Builds the signup funnel.",
+ "headline": "Builds the signup funnel.",
+ "focus_areas": [{"topic": "signup funnel", "strength": "high", "last_seen": "2026-10-18"}],
+ "products": ["product_analytics"],
+ "recent_shift": "Moved from dashboards to funnels.",
+}
+
+
+@time_machine.travel(NOW, tick=False)
+class TestActivitySummaryAPI(APIBaseTest):
+ def setUp(self) -> None:
+ super().setUp()
+ self.organization.is_ai_data_processing_approved = True
+ self.organization.save()
+ self.config = ActivitySummaryConfig(enabled=True, organization_ids=(str(self.organization.id),))
+ read_config = patch(
+ "products.signals.backend.activity_summary.read.read_config", side_effect=lambda: self.config
+ )
+ read_config.start()
+ self.addCleanup(read_config.stop)
+
+ def _summary(self, user: User | None = None, *, summary: dict[str, Any] | None = None, version: int = 1) -> None:
+ UserActivitySummary.objects.for_team(self.team.id).create(
+ team=self.team,
+ user=user or self.user,
+ status=UserActivitySummary.Status.OK,
+ summary=SUMMARY if summary is None else summary,
+ summary_text="text",
+ generated_at=NOW,
+ prompt_version=PROMPT_VERSION,
+ render_version=RENDER_VERSION,
+ version=version,
+ )
+
+ def _versions(self, count: int) -> None:
+ self._summary(version=count)
+ row = UserActivitySummary.objects.for_team(self.team.id).get(user=self.user)
+ for number in range(1, count + 1):
+ UserActivitySummaryVersion.objects.for_team(self.team.id).create(
+ team=self.team,
+ summary_row=row,
+ version=number,
+ summary={**SUMMARY, "headline": f"Version {number}"},
+ summary_text="text",
+ generated_at=NOW - datetime.timedelta(days=count - number),
+ model="model",
+ prompt_version=PROMPT_VERSION,
+ render_version=RENDER_VERSION,
+ input_watermark=NOW,
+ )
+
+ def _get(self, path: str = "") -> Any:
+ return self.client.get(f"/api/projects/{self.team.id}/signals/activity_summary/{path}")
+
+ @parameterized.expand(
+ [
+ ("disabled", {"enabled": False}, False, True),
+ ("organization_not_listed", {"organization_ids": ("00000000-0000-0000-0000-000000000001",)}, False, True),
+ ("team_skipped", {}, True, True),
+ ("ai_processing_not_approved", {}, False, False),
+ ]
+ )
+ def test_both_endpoints_return_404_outside_enrolled_teams(
+ self, _name: str, overrides: dict[str, Any], skip_own_team: bool, approved: bool
+ ) -> None:
+ self._versions(1)
+ self.config = dataclasses.replace(
+ self.config, skip_team_ids=(self.team.id,) if skip_own_team else (), **overrides
+ )
+ self.organization.is_ai_data_processing_approved = approved
+ self.organization.save()
+
+ assert self._get().status_code == 404
+ assert self._get("versions/").status_code == 404
+
+ def test_enroll_all_approved_enrolls_an_unlisted_organization(self) -> None:
+ self.config = ActivitySummaryConfig(enabled=True, enroll_all_approved=True)
+ self._summary()
+
+ response = self._get()
+
+ assert response.status_code == 200
+ assert response.json()["status"] == "ready"
+
+ @parameterized.expand(
+ [
+ ("no_row", None, {"status": "not_ready", "headline": None, "profile": None}),
+ (
+ "current_row",
+ SUMMARY,
+ {"status": "ready", "headline": "Builds the signup funnel.", "profile": SUMMARY["profile"]},
+ ),
+ (
+ "pre_profile_row",
+ {"summary": "Builds funnels.", "focus_areas": [], "products": []},
+ {"status": "ready", "headline": "Builds funnels.", "profile": None},
+ ),
+ ]
+ )
+ def test_get_returns_the_summary_of_the_calling_user(
+ self, _name: str, summary: dict[str, Any] | None, expected: dict[str, Any]
+ ) -> None:
+ other = User.objects.create_and_join(self.organization, "[email protected]", "password")
+ self._summary(other, summary={**SUMMARY, "headline": "Someone else's work."})
+ if summary is not None:
+ self._summary(summary=summary)
+
+ with patch("products.signals.backend.presentation.activity_summary.report_user_action") as capture:
+ response = self._get()
+
+ assert response.status_code == 200
+ assert {key: response.json()[key] for key in expected} == expected
+ properties = capture.call_args.kwargs["properties"]
+ assert properties["status"] == expected["status"]
+ assert not any(isinstance(value, str) and "funnel" in value.lower() for value in properties.values())
+
+ def test_versions_come_newest_first_and_the_limit_is_capped(self) -> None:
+ self.config = ActivitySummaryConfig(enabled=True, organization_ids=(str(self.organization.id),), max_versions=3)
+ self._versions(5)
+
+ response = self._get("versions/?limit=10")
+
+ assert response.status_code == 200
+ assert [item["version"] for item in response.json()] == [5, 4, 3]
+ assert all(item["profile"] is None for item in response.json())
+
+ @parameterized.expand([("existing", 2, 200), ("missing", 9, 404)])
+ def test_one_version_returns_its_profile(self, _name: str, version: int, status_code: int) -> None:
+ self._versions(3)
+
+ response = self._get(f"versions/?version={version}")
+
+ assert response.status_code == status_code
+ if status_code == 200:
+ assert response.json() == [
+ {
+ "version": 2,
+ "generated_at": "2026-10-18T12:00:00Z",
+ "prompt_version": PROMPT_VERSION,
+ "headline": "Version 2",
+ "recent_shift": SUMMARY["recent_shift"],
+ "focus_areas": SUMMARY["focus_areas"],
+ "profile": SUMMARY["profile"],
+ }
+ ]
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index ece1640f4c98..ea7a5d5163d0 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -7,6 +7,100 @@
* PostHog API - generated
* OpenAPI spec version: 1.0.0
*/
+/**
+ * * `ready` - Ready
+ * * `not_ready` - Not Ready
+ */
+export type ActivitySummaryStatusEnumApi =
+ (typeof ActivitySummaryStatusEnumApi)[keyof typeof ActivitySummaryStatusEnumApi]
+
+export const ActivitySummaryStatusEnumApi = {
+ Ready: 'ready',
+ NotReady: 'not_ready',
+} as const
+
+export interface ActivitySummaryFocusAreaApi {
+ /** A main thread of the user's work, in the words of their activity. */
+ topic: string
+ /**
+ * How much of the recent activity is about this thread: high, medium or low.
+ * @nullable
+ */
+ strength: string | null
+ /**
+ * The last day with activity on this thread, as YYYY-MM-DD.
+ * @nullable
+ */
+ last_seen: string | null
+}
+
+export interface ActivitySummaryApi {
+ /** `ready` when a summary exists. `not_ready` when no summary exists yet, which is normal for new or quiet users.
+ *
+ * * `ready` - Ready
+ * * `not_ready` - Not Ready */
+ status: ActivitySummaryStatusEnumApi
+ /**
+ * Two or three sentences that capture the profile.
+ * @nullable
+ */
+ headline: string | null
+ /**
+ * A one-page markdown profile of the user's work in this project. Null on summaries from before profiles existed.
+ * @nullable
+ */
+ profile: string | null
+ /** The main threads of the user's work. */
+ focus_areas: ActivitySummaryFocusAreaApi[]
+ /** The PostHog products the user works with, by name. */
+ products: string[]
+ /**
+ * What changed since the version before this one, or null when nothing changed.
+ * @nullable
+ */
+ recent_shift: string | null
+ /**
+ * When this version of the summary was written.
+ * @nullable
+ */
+ generated_at: string | null
+ /** The number of this version of the summary. 0 before the first. */
+ version: number
+ /**
+ * The version of the prompt that wrote this summary.
+ * @nullable
+ */
+ prompt_version: number | null
+ /** True when a newer version will replace this summary soon. */
+ stale: boolean
+}
+
+export interface ActivitySummaryVersionApi {
+ /** The number of this version. Higher numbers are newer. */
+ version: number
+ /** When this version was written. */
+ generated_at: string
+ /** The version of the prompt that wrote this version. */
+ prompt_version: number
+ /**
+ * Two or three sentences that capture the profile.
+ * @nullable
+ */
+ headline: string | null
+ /**
+ * What changed since the version before this one, or null when nothing changed.
+ * @nullable
+ */
+ recent_shift: string | null
+ /** The main threads of the user's work. */
+ focus_areas: ActivitySummaryFocusAreaApi[]
+ /**
+ * The one-page markdown profile. Set only when the request asks for one version with `version`.
+ * @nullable
+ */
+ profile: string | null
+}
+
/**
* Per-repository base branch overrides for auto-started inbox PRs, keyed by 'organization/repository'. The branch is what the auto-PR targets; omit a repo (or send {}) to keep targeting the repo default branch.
*/
@@ -8909,6 +9003,19 @@ export interface SignalUserAutonomyConfigCreateApi {
github_open_pull_request_ready?: boolean | null
}
+export type SignalsActivitySummaryVersionsRetrieveParams = {
+ /**
+ * The most versions to return, newest first. Capped at the number of versions kept.
+ * @minimum 1
+ */
+ limit?: number
+ /**
+ * Return only this version, with its full profile. Returns 404 when the version does not exist.
+ * @minimum 1
+ */
+ version?: number
+}
+
export type SignalsProcessingListParams = {
/**
* Number of results to return per page.
diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.ts
index 4ec3814c8ba6..7f6a4f48d1c7 100644
--- a/products/signals/frontend/generated/api.ts
+++ b/products/signals/frontend/generated/api.ts
@@ -9,6 +9,8 @@ import { apiMutator } from '../../../../frontend/src/lib/api-orval-mutator'
* OpenAPI spec version: 1.0.0
*/
import type {
+ ActivitySummaryApi,
+ ActivitySummaryVersionApi,
CancelReportCheckRequestApi,
CommitDiffResponseApi,
CreateReportCheckRequestApi,
@@ -131,6 +133,7 @@ import type {
SignalTeamConfigApi,
SignalUserAutonomyConfigApi,
SignalUserAutonomyConfigCreateApi,
+ SignalsActivitySummaryVersionsRetrieveParams,
SignalsProcessingListParams,
SignalsReportArtefactsListParams,
SignalsReportChecksListParams,
@@ -184,6 +187,56 @@ type NonReadonly<T> = [T] extends [UnionToIntersection<T>]
}
: DistributeReadOnlyOverUnions<T>
+export const getSignalsActivitySummaryListUrl = (projectId: string) => {
+ return `/api/projects/${projectId}/signals/activity_summary/`
+}
+
+/**
+ * @summary Get your activity summary
+ */
+export const signalsActivitySummaryList = async (
+ projectId: string,
+ options?: RequestInit
+): Promise<ActivitySummaryApi> => {
+ return apiMutator<ActivitySummaryApi>(getSignalsActivitySummaryListUrl(projectId), {
+ ...options,
+ method: 'GET',
+ })
+}
+
+export const getSignalsActivitySummaryVersionsRetrieveUrl = (
+ projectId: string,
+ params?: SignalsActivitySummaryVersionsRetrieveParams
+) => {
+ const normalizedParams = new URLSearchParams()
+
+ Object.entries(params || {}).forEach(([key, value]) => {
+ if (value !== undefined) {
+ normalizedParams.append(key, value === null ? 'null' : String(value))
+ }
+ })
+
+ const stringifiedParams = normalizedParams.toString()
+
+ return stringifiedParams.length > 0
+ ? `/api/projects/${projectId}/signals/activity_summary/versions/?${stringifiedParams}`
+ : `/api/projects/${projectId}/signals/activity_summary/versions/`
+}
+
+/**
+ * @summary List your activity summary versions
+ */
+export const signalsActivitySummaryVersionsRetrieve = async (
+ projectId: string,
+ params?: SignalsActivitySummaryVersionsRetrieveParams,
+ options?: RequestInit
+): Promise<ActivitySummaryVersionApi[]> => {
+ return apiMutator<ActivitySummaryVersionApi[]>(getSignalsActivitySummaryVersionsRetrieveUrl(projectId, params), {
+ ...options,
+ method: 'GET',
+ })
+}
+
export const getSignalsConfigListUrl = (projectId: string) => {
return `/api/projects/${projectId}/signals/config/`
}
diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yaml
index 93eb5e80b3d8..2e24f8885a55 100644
--- a/products/signals/mcp/tools.yaml
+++ b/products/signals/mcp/tools.yaml
@@ -7,6 +7,30 @@ feature: signals
url_prefix: /inbox
ui_apps: {}
tools:
+ activity-summary-get:
+ operation: signals_activity_summary_list
+ enabled: true
+ title: Get your activity summary
+ description: >
+ Get a summary of what the current user has been working on in this project: a one-page markdown profile, a
+ short headline, the main focus areas with the day each was last seen, and the PostHog products they use. It
+ is built only from the user's own recent activity in PostHog, such as tasks they gave to PostHog AI and
+ things they created, changed or opened. It updates at most once a day, when there is enough new activity.
+ Use it to tailor answers and suggestions to what this person works on. `status: not_ready` means no summary
+ exists yet, which is normal for new or quiet users. `stale: true` means a newer version will replace it
+ soon. A 404 means activity summaries are not available for this project.
+ feature_flag: activity-summary
+ activity-summary-versions-list:
+ operation: signals_activity_summary_versions_retrieve
+ enabled: true
+ title: List your activity summary versions
+ description: >
+ List earlier versions of the current user's activity summary in this project, newest first, to see how their
+ focus changed over time. Each version has a headline, the focus areas and `recent_shift`, which says what
+ changed since the version before it. The list leaves out the profile to stay small. Pass `version` to get
+ one version with its full profile. A 404 means activity summaries are not available for this project, or
+ that the requested version does not exist.
+ feature_flag: activity-summary
inbox-report-actions-list:
operation: signals_reports_actions_list
enabled: true
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index 0e437e8d6f1f..86da8a35d6b0 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -647,6 +647,38 @@
"readOnlyHint": true
}
},
+ "activity-summary-get": {
+ "description": "Get a summary of what the current user has been working on in this project: a one-page markdown profile, a short headline, the main focus areas with the day each was last seen, and the PostHog products they use. It is built only from the user's own recent activity in PostHog, such as tasks they gave to PostHog AI and things they created, changed or opened. It updates at most once a day, when there is enough new activity. Use it to tailor answers and suggestions to what this person works on. `status: not_ready` means no summary exists yet, which is normal for new or quiet users. `stale: true` means a newer version will replace it soon. A 404 means activity summaries are not available for this project.",
+ "category": "Signals",
+ "feature": "signals",
+ "summary": "Get your activity summary",
+ "title": "Get your activity summary",
+ "required_scopes": ["task:read"],
+ "api_operations": ["GET /api/projects/{project_id}/signals/activity_summary/"],
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": true
+ },
+ "feature_flag": "activity-summary"
+ },
+ "activity-summary-versions-list": {
+ "description": "List earlier versions of the current user's activity summary in this project, newest first, to see how their focus changed over time. Each version has a headline, the focus areas and `recent_shift`, which says what changed since the version before it. The list leaves out the profile to stay small. Pass `version` to get one version with its full profile. A 404 means activity summaries are not available for this project, or that the requested version does not exist.",
+ "category": "Signals",
+ "feature": "signals",
+ "summary": "List your activity summary versions",
+ "title": "List your activity summary versions",
+ "required_scopes": ["task:read"],
+ "api_operations": ["GET /api/projects/{project_id}/signals/activity_summary/versions/"],
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": true
+ },
+ "feature_flag": "activity-summary"
+ },
"advanced-activity-logs-filters": {
"description": "Get the valid filter values for activity logs — the scopes, activity types, and users that actually have logged activity in this project. Call this before advanced-activity-logs-list when you need to filter and don't know the exact scope or activity strings to pass; skip it when you already know them.",
"category": "Platform Features",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index a4cd456aa0b2..7982898575ee 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -647,6 +647,38 @@
"readOnlyHint": true
}
},
+ "activity-summary-get": {
+ "description": "Get a summary of what the current user has been working on in this project: a one-page markdown profile, a short headline, the main focus areas with the day each was last seen, and the PostHog products they use. It is built only from the user's own recent activity in PostHog, such as tasks they gave to PostHog AI and things they created, changed or opened. It updates at most once a day, when there is enough new activity. Use it to tailor answers and suggestions to what this person works on. `status: not_ready` means no summary exists yet, which is normal for new or quiet users. `stale: true` means a newer version will replace it soon. A 404 means activity summaries are not available for this project.",
+ "category": "Signals",
+ "feature": "signals",
+ "summary": "Get your activity summary",
+ "title": "Get your activity summary",
+ "required_scopes": ["task:read"],
+ "api_operations": ["GET /api/projects/{project_id}/signals/activity_summary/"],
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": true
+ },
+ "feature_flag": "activity-summary"
+ },
+ "activity-summary-versions-list": {
+ "description": "List earlier versions of the current user's activity summary in this project, newest first, to see how their focus changed over time. Each version has a headline, the focus areas and `recent_shift`, which says what changed since the version before it. The list leaves out the profile to stay small. Pass `version` to get one version with its full profile. A 404 means activity summaries are not available for this project, or that the requested version does not exist.",
+ "category": "Signals",
+ "feature": "signals",
+ "summary": "List your activity summary versions",
+ "title": "List your activity summary versions",
+ "required_scopes": ["task:read"],
+ "api_operations": ["GET /api/projects/{project_id}/signals/activity_summary/versions/"],
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": true
+ },
+ "feature_flag": "activity-summary"
+ },
"advanced-activity-logs-filters": {
"description": "Get the valid filter values for activity logs — the scopes, activity types, and users that actually have logged activity in this project. Call this before advanced-activity-logs-list when you need to filter and don't know the exact scope or activity strings to pass; skip it when you already know them.",
"category": "Platform Features",
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 0ee542a721ce..ecca9196fef0 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -5157,6 +5157,100 @@ export namespace Schemas {
total_count: number;
}
+ /**
+ * * `ready` - Ready
+ * * `not_ready` - Not Ready
+ */
+ export type ActivitySummaryStatusEnum = typeof ActivitySummaryStatusEnum[keyof typeof ActivitySummaryStatusEnum];
+
+
+ export const ActivitySummaryStatusEnum = {
+ Ready: 'ready',
+ NotReady: 'not_ready',
+ } as const;
+
+ export interface ActivitySummaryFocusArea {
+ /** A main thread of the user's work, in the words of their activity. */
+ topic: string;
+ /**
+ * How much of the recent activity is about this thread: high, medium or low.
+ * @nullable
+ */
+ strength: string | null;
+ /**
+ * The last day with activity on this thread, as YYYY-MM-DD.
+ * @nullable
+ */
+ last_seen: string | null;
+ }
+
+ export interface ActivitySummary {
+ /** `ready` when a summary exists. `not_ready` when no summary exists yet, which is normal for new or quiet users.
+ *
+ * * `ready` - Ready
+ * * `not_ready` - Not Ready */
+ status: ActivitySummaryStatusEnum;
+ /**
+ * Two or three sentences that capture the profile.
+ * @nullable
+ */
+ headline: string | null;
+ /**
+ * A one-page markdown profile of the user's work in this project. Null on summaries from before profiles existed.
+ * @nullable
+ */
+ profile: string | null;
+ /** The main threads of the user's work. */
+ focus_areas: ActivitySummaryFocusArea[];
+ /** The PostHog products the user works with, by name. */
+ products: string[];
+ /**
+ * What changed since the version before this one, or null when nothing changed.
+ * @nullable
+ */
+ recent_shift: string | null;
+ /**
+ * When this version of the summary was written.
+ * @nullable
+ */
+ generated_at: string | null;
+ /** The number of this version of the summary. 0 before the first. */
+ version: number;
+ /**
+ * The version of the prompt that wrote this summary.
+ * @nullable
+ */
+ prompt_version: number | null;
+ /** True when a newer version will replace this summary soon. */
+ stale: boolean;
+ }
+
+ export interface ActivitySummaryVersion {
+ /** The number of this version. Higher numbers are newer. */
+ version: number;
+ /** When this version was written. */
+ generated_at: string;
+ /** The version of the prompt that wrote this version. */
+ prompt_version: number;
+ /**
+ * Two or three sentences that capture the profile.
+ * @nullable
+ */
+ headline: string | null;
+ /**
+ * What changed since the version before this one, or null when nothing changed.
+ * @nullable
+ */
+ recent_shift: string | null;
+ /** The main threads of the user's work. */
+ focus_areas: ActivitySummaryFocusArea[];
+ /**
+ * The one-page markdown profile. Set only when the request asks for one version with `version`.
+ * @nullable
+ */
+ profile: string | null;
+ }
+
export interface ActorsPropertyTaxonomyResponse {
sample_count: number;
sample_values: (string | number | boolean)[];
@@ -134161,6 +134255,19 @@ export namespace Schemas {
offset?: number;
};
+ export type SignalsActivitySummaryVersionsRetrieveParams = {
+ /**
+ * The most versions to return, newest first. Capped at the number of versions kept.
+ * @minimum 1
+ */
+ limit?: number;
+ /**
+ * Return only this version, with its full profile. Returns 404 when the version does not exist.
+ * @minimum 1
+ */
+ version?: number;
+ };
+
export type SignalsProcessingListParams = {
/**
* Number of results to return per page.
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 1b2f22783e4b..d4ccb078db5e 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -3,11 +3,48 @@
* MCP service uses these Zod schemas for generated tool handlers.
* To regenerate: hogli build:openapi
*
- * PostHog API - MCP 68 enabled ops
+ * PostHog API - MCP 70 enabled ops
* OpenAPI spec version: 1.0.0
*/
import * as zod from 'zod'
+/**
+ * @summary Get your activity summary
+ */
+export const SignalsActivitySummaryListParams = () => 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\/."
+ ),
+})
+
+/**
+ * @summary List your activity summary versions
+ */
+export const SignalsActivitySummaryVersionsRetrieveParams = () => 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 signalsActivitySummaryVersionsRetrieveQueryLimitDefault = 5
+
+export const SignalsActivitySummaryVersionsRetrieveQueryParams = () => zod.object({
+ limit: zod
+ .number()
+ .min(1)
+ .default(signalsActivitySummaryVersionsRetrieveQueryLimitDefault)
+ .describe('The most versions to return, newest first. Capped at the number of versions kept.'),
+ version: zod
+ .number()
+ .min(1)
+ .optional()
+ .describe('Return only this version, with its full profile. Returns 404 when the version does not exist.'),
+})
+
/**
* Team-level signal autonomy config (singleton per team).
*
diff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.ts
index 260b29ee2828..19bb3f290ba6 100644
--- a/services/mcp/src/tools/generated/signals.ts
+++ b/services/mcp/src/tools/generated/signals.ts
@@ -16,6 +16,47 @@ import {
} from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
+const ActivitySummaryGetSchema = () => z.object({})
+
+const activitySummaryGet = (): ToolBase<ReturnType<typeof ActivitySummaryGetSchema>, Schemas.ActivitySummary> => ({
+ name: 'activity-summary-get',
+ schema: ActivitySummaryGetSchema(),
+ handler: async (context: Context, _params: z.infer<ReturnType<typeof ActivitySummaryGetSchema>>) => {
+ const projectId = await context.stateManager.getProjectId()
+ const result = await context.api.request<Schemas.ActivitySummary>({
+ method: 'GET',
+ path: `/api/projects/${encodeURIComponent(String(projectId))}/signals/activity_summary/`,
+ })
+ return result
+ },
+})
+
+const ActivitySummaryVersionsListSchema = () => {
+ const SignalsActivitySummaryVersionsRetrieveQueryParams =
+ orvalSchemas.SignalsActivitySummaryVersionsRetrieveQueryParams()
+ return SignalsActivitySummaryVersionsRetrieveQueryParams
+}
+
+const activitySummaryVersionsList = (): ToolBase<
+ ReturnType<typeof ActivitySummaryVersionsListSchema>,
+ Schemas.ActivitySummaryVersion[]
+> => ({
+ name: 'activity-summary-versions-list',
+ schema: ActivitySummaryVersionsListSchema(),
+ handler: async (context: Context, params: z.infer<ReturnType<typeof ActivitySummaryVersionsListSchema>>) => {
+ const projectId = await context.stateManager.getProjectId()
+ const result = await context.api.request<Schemas.ActivitySummaryVersion[]>({
+ method: 'GET',
+ path: `/api/projects/${encodeURIComponent(String(projectId))}/signals/activity_summary/versions/`,
+ query: {
+ limit: params.limit,
+ version: params.version,
+ },
+ })
+ return result
+ },
+})
+
const InboxReportActionsListSchema = () => {
const SignalsReportsActionsListParams = orvalSchemas.SignalsReportsActionsListParams()
return z.preprocess(
@@ -3226,6 +3267,8 @@ const signalsScoutScratchpadSearch = (): ToolBase<
})
export const GENERATED_TOOLS: Record<string, () => ToolBase<ZodObjectAny>> = {
+ 'activity-summary-get': activitySummaryGet,
+ 'activity-summary-versions-list': activitySummaryVersionsList,
'inbox-report-actions-list': inboxReportActionsList,
'inbox-report-actions-run': inboxReportActionsRun,
'inbox-report-artefacts-create': inboxReportArtefactsCreate,
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-summary-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-summary-get.json
new file mode 100644
index 000000000000..7b7ea9186078
--- /dev/null
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-summary-get.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "properties": {},
+ "type": "object"
+}
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-summary-versions-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-summary-versions-list.json
new file mode 100644
index 000000000000..30706fd36750
--- /dev/null
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-summary-versions-list.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "properties": {
+ "limit": {
+ "default": 5,
+ "description": "The most versions to return, newest first. Capped at the number of versions kept.",
+ "minimum": 1,
+ "type": "number"
+ },
+ "version": {
+ "description": "Return only this version, with its full profile. Returns 404 when the version does not exist.",
+ "minimum": 1,
+ "type": "number"
+ }
+ },
+ "type": "object"
+}
diff --git a/services/mcp/tests/unit/tool-filtering.test.ts b/services/mcp/tests/unit/tool-filtering.test.ts
index a173c99cc070..f3a08dd96251 100644
--- a/services/mcp/tests/unit/tool-filtering.test.ts
+++ b/services/mcp/tests/unit/tool-filtering.test.ts
@@ -1111,6 +1111,7 @@ describe('Tool Filtering - Feature Flags', () => {
'insight-data-checks',
'logs-agent-tools',
'workflows-transactional-email-api',
+ 'activity-summary',
]
expect(allFlags).toEqual(expect.arrayContaining(branchFlags))
// The flags branches add are asserted on the line above and held out of the list and
diff --git a/services/mcp/tests/unit/tool-schema-snapshots.test.ts b/services/mcp/tests/unit/tool-schema-snapshots.test.ts
index cb4bbac08589..ddae52ea4b48 100644
--- a/services/mcp/tests/unit/tool-schema-snapshots.test.ts
+++ b/services/mcp/tests/unit/tool-schema-snapshots.test.ts
@@ -108,6 +108,7 @@ async function loadSnapshotTools(): Promise<Tool<ZodObjectAny>[]> {
'workflows-mcp-onboarding': true,
'insight-data-checks': true,
'workflows-transactional-email-api': true,
+ 'activity-summary': true,
}
return [...(await getToolsFromContext(createMockContext(), { featureFlags }))].sort((a, b) =>
a.name.localeCompare(b.name)