: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
fix(mcp): repair advanced activity-log filters, drop legacy list tool (#69178)
Yasene502c9fe044a
diff --git a/posthog/api/advanced_activity_logs/test_json_tolerant_list_field.py b/posthog/api/advanced_activity_logs/test_json_tolerant_list_field.pynew file mode 100644index 000000000000..9b47ac8571cf--- /dev/null+++ b/posthog/api/advanced_activity_logs/test_json_tolerant_list_field.py@@ -0,0 +1,35 @@+from django.http import QueryDict+from django.test import SimpleTestCase++from parameterized import parameterized++from posthog.api.advanced_activity_logs.viewset import AdvancedActivityLogFiltersSerializer+++def _querydict(pairs: list[tuple[str, str]]) -> QueryDict:+ qd = QueryDict(mutable=True)+ for key, value in pairs:+ qd.appendlist(key, value)+ return qd+++class TestJSONTolerantListField(SimpleTestCase):+ @parameterized.expand(+ [+ ("json_encoded_array", [("scopes", '["FeatureFlag","Insight"]')], ["FeatureFlag", "Insight"]),+ ("repeated_params", [("scopes", "FeatureFlag"), ("scopes", "Insight")], ["FeatureFlag", "Insight"]),+ ("json_single_element", [("scopes", '["FeatureFlag"]')], ["FeatureFlag"]),+ ("single_plain_value", [("scopes", "FeatureFlag")], ["FeatureFlag"]),+ ]+ )+ def test_scopes_accepts_json_and_repeated(+ self, _name: str, pairs: list[tuple[str, str]], expected: list[str]+ ) -> None:+ serializer = AdvancedActivityLogFiltersSerializer(data=_querydict(pairs))+ serializer.is_valid(raise_exception=True)+ self.assertEqual(serializer.validated_data["scopes"], expected)++ def test_item_ids_accepts_json_encoded_array(self) -> None:+ serializer = AdvancedActivityLogFiltersSerializer(data=_querydict([("item_ids", '["680699","123"]')]))+ serializer.is_valid(raise_exception=True)+ self.assertEqual(serializer.validated_data["item_ids"], ["680699", "123"])diff --git a/posthog/api/advanced_activity_logs/viewset.py b/posthog/api/advanced_activity_logs/viewset.pyindex c6e074472fb1..6727e27454e9 100644--- a/posthog/api/advanced_activity_logs/viewset.py+++ b/posthog/api/advanced_activity_logs/viewset.py@@ -8,7 +8,7 @@ from urllib.parse import urlencodefrom django.db.models import Q, QuerySet-from drf_spectacular.utils import extend_schema, extend_schema_field+from drf_spectacular.utils import extend_schemafrom rest_framework import mixins, serializers, viewsetsfrom rest_framework.decorators import actionfrom rest_framework.pagination import BasePagination, CursorPagination, PageNumberPagination@@ -16,6 +16,7 @@ from rest_framework.permissions import BasePermissionfrom rest_framework.request import Requestfrom rest_framework.response import Response+from posthog.api.fields import JSONStringFilterField, JSONTolerantListField, OptionalBooleanFieldfrom posthog.api.routing import TeamAndOrgViewSetMixinfrom posthog.api.shared import UserBasicSerializerfrom posthog.constants import AvailableFeature@@ -195,23 +196,6 @@ class ActivityLogViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet, mixinsreturn queryset-class OptionalBooleanField(serializers.BooleanField):- """BooleanField that returns None when missing instead of False."""-- default_empty_html = None-- def __init__(self, **kwargs):- kwargs.setdefault("allow_null", True)- super().__init__(**kwargs)---@extend_schema_field({"type": "string"})-class JSONStringFilterField(serializers.JSONField):- """JSONField exposed as a JSON-encoded string in the schema (for query string clients)."""-- pass--_IP_FILTER_RE = re.compile(r"^[0-9a-fA-F:.*]+$")_IPV4_RE = re.compile(r"^\d{1,3}(\.\d{1,3}){3}$")@@ -245,31 +229,31 @@ class AdvancedActivityLogFiltersSerializer(serializers.Serializer):required=False,help_text="Upper bound on `created_at` (inclusive), ISO-8601.",)- users = serializers.ListField(+ users = JSONTolerantListField(child=serializers.UUIDField(),required=False,default=[],help_text="Filter by users who performed the activity (user UUIDs).",)- scopes = serializers.ListField(+ scopes = JSONTolerantListField(child=serializers.CharField(),required=False,default=[],help_text='Filter by activity scopes (e.g. "FeatureFlag", "Insight").',)- activities = serializers.ListField(+ activities = JSONTolerantListField(child=serializers.CharField(),required=False,default=[],help_text='Filter by activity types (e.g. "created", "updated", "deleted").',)- clients = serializers.ListField(+ clients = JSONTolerantListField(child=serializers.CharField(),required=False,default=[],help_text="Filter by API clients that generated the activity (from x-posthog-client header).",)- ip_addresses = serializers.ListField(+ ip_addresses = JSONTolerantListField(child=serializers.CharField(validators=[_validate_ip_or_wildcard]),required=False,default=[],@@ -278,7 +262,7 @@ class AdvancedActivityLogFiltersSerializer(serializers.Serializer):"using `*` (e.g. `203.0.113.*`). Multiple entries are OR-combined."),)- team_ids = serializers.ListField(+ team_ids = JSONTolerantListField(child=serializers.IntegerField(),required=False,default=[],@@ -312,7 +296,7 @@ class AdvancedActivityLogFiltersSerializer(serializers.Serializer):required=False,help_text="When set, filters rows authored by the system (no user).",)- item_ids = serializers.ListField(+ item_ids = JSONTolerantListField(child=serializers.CharField(),required=False,default=[],diff --git a/posthog/api/fields.py b/posthog/api/fields.pynew file mode 100644index 000000000000..e40024bbcb6c--- /dev/null+++ b/posthog/api/fields.py@@ -0,0 +1,50 @@+"""Reusable DRF serializer fields shared across the API.++Add generic, endpoint-agnostic serializer field types here so viewsets can+reuse them instead of redefining local copies.+"""++import json++from drf_spectacular.utils import extend_schema_field+from rest_framework import serializers+++class OptionalBooleanField(serializers.BooleanField):+ """BooleanField that returns None when missing instead of False."""++ default_empty_html = None++ def __init__(self, **kwargs):+ kwargs.setdefault("allow_null", True)+ super().__init__(**kwargs)+++@extend_schema_field({"type": "string"})+class JSONStringFilterField(serializers.JSONField):+ """JSONField exposed as a JSON-encoded string in the schema (for query string clients)."""++ pass+++class JSONTolerantListField(serializers.ListField):+ """ListField that also accepts a single JSON-encoded array as the query value.++ Standard clients send array query params as repeated params+ (?scopes=a&scopes=b), which DRF reads via ``getlist``. Some clients (e.g. the+ MCP client) send a single JSON-encoded array instead (?scopes=["a","b"]);+ accept that too so both encodings resolve to the same filter.+ """++ def get_value(self, dictionary):+ value = super().get_value(dictionary)+ if isinstance(value, list) and len(value) == 1 and isinstance(value[0], str):+ candidate = value[0].strip()+ if candidate.startswith("[") and candidate.endswith("]"):+ try:+ parsed = json.loads(candidate)+ except (json.JSONDecodeError, ValueError):+ return value+ if isinstance(parsed, list):+ return parsed+ return valuediff --git a/products/experiments/skills/diagnosing-experiment-results/references/bias-and-skew.md b/products/experiments/skills/diagnosing-experiment-results/references/bias-and-skew.mdindex 571fd32fcd0c..368846751e4e 100644--- a/products/experiments/skills/diagnosing-experiment-results/references/bias-and-skew.md+++ b/products/experiments/skills/diagnosing-experiment-results/references/bias-and-skew.md@@ -349,7 +349,7 @@ The four common shapes:everyone. Rare but high-impact.**Detect.** `feature-flags-activity-retrieve { id: <feature_flag_id> }` is authoritative for the-diff (the higher-fidelity activity endpoint). `activity-log-list { scope: "FeatureFlag" }` only+diff (the higher-fidelity activity endpoint). `advanced-activity-logs-list { scopes: ["FeatureFlag"] }` onlyshows _who/when_, not _what_ — but a cluster of edits around or after `start_date` is thefingerprint to pursue further.diff --git a/products/experiments/skills/diagnosing-experiment-results/references/diagnostic-snapshot.md b/products/experiments/skills/diagnosing-experiment-results/references/diagnostic-snapshot.mdindex 4dde97a2f711..b42d50f95598 100644--- a/products/experiments/skills/diagnosing-experiment-results/references/diagnostic-snapshot.md+++ b/products/experiments/skills/diagnosing-experiment-results/references/diagnostic-snapshot.md@@ -2,7 +2,7 @@Before asking clarifying questions, gather evidence directly. Most diagnostics in this skill can beconfirmed or ruled out by data — the agent has `execute-sql`, `experiment-stats`,-`feature-flags-activity-retrieve`, and `activity-log-list` and should use them. Treat user-facing+`feature-flags-activity-retrieve`, and `advanced-activity-logs-list` and should use them. Treat user-facingquestions as a fallback for when MCP cannot answer.Run this snapshot once and reuse the results across the dispatch table in `SKILL.md`.@@ -123,7 +123,7 @@ event-side identity signals, not the activity log.- **`feature-flags-activity-retrieve { id: <feature_flag_id> }`** — recent flag edits and their diffs.Most "why did the numbers change?" surprises trace back to a variant-distribution change visible here.-- **`activity-log-list { scope: "Experiment", item_id: <experiment_id> }`** — experiment-level edits as+- **`advanced-activity-logs-list { scopes: ["Experiment"], item_ids: [<experiment_id>] }`** — experiment-level edits asa timeline (the response currently doesn't carry a change diff, so use it for _who/when_, not_what_).diff --git a/products/experiments/skills/diagnosing-experiment-results/references/mid-run-changes.md b/products/experiments/skills/diagnosing-experiment-results/references/mid-run-changes.mdindex 8d7a0f9ed133..3db8b559fea3 100644--- a/products/experiments/skills/diagnosing-experiment-results/references/mid-run-changes.md+++ b/products/experiments/skills/diagnosing-experiment-results/references/mid-run-changes.md@@ -144,7 +144,7 @@ The MCP tool that performs this rewrite is `experiment-ship-variant`. It takes`release_to_everyone: bool` (defaults to `false` = "roll out to the experiment population"); theagent should confirm the release mode with the user before invoking, in addition to the variant key.-Note: `activity-log-list { scope: "Experiment", item_id: <id> }` will _not_ tell you this — that+Note: `advanced-activity-logs-list { scopes: ["Experiment"], item_ids: [<id>] }` will _not_ tell you this — thatendpoint returns `activity: "updated"` with no change diff. Use the `feature-flags-activity-retrieve` tool.**Default to control on ambiguous ships.** If the user is unsure which variant to ship — primary@@ -174,7 +174,7 @@ during the pause window. No new exposure events fire while paused.control-like behavior. Their data during the pause is mixed.**Recommend:** when interpreting results that span a pause window, surface the pause dates from-the activity log (`activity-log-list { scope: "Experiment", item_id: <id> }`) and explain that the+the activity log (`advanced-activity-logs-list { scopes: ["Experiment"], item_ids: [<id>] }`) and explain that themetric data during that window mixes test-variant users with control-like behavior. If the pausewas long relative to the run, consider reset + relaunch over interpreting the contaminated data.diff --git a/products/platform_features/mcp/tools.yaml b/products/platform_features/mcp/tools.yamlindex 1438063d76c1..5b3c6cb72237 100644--- a/products/platform_features/mcp/tools.yaml+++ b/products/platform_features/mcp/tools.yaml@@ -11,39 +11,7 @@ ui_apps: {}tools:activity-log-list:operation: activity_log_list- enabled: true- scopes:- - activity_log:read- annotations:- readOnly: true- destructive: false- idempotent: true- list: true- title: List recent activity in the project.- description: >- List recent activity log entries for the project. Shows who did what and when — feature flag changes,- dashboard edits, experiment launches, etc. Supports filtering by scope, user, and date range.- param_overrides:- page_size:- default: 10- cast: string-int- page:- cast: string-int- url_prefix: /activity- response:- include:- - id- - user.id- - user.first_name- - user.last_name- - user.email- - activity- - scope- - item_id- - detail.name- - detail.short_id- - detail.type- - created_at+ enabled: falseadvanced-activity-logs-export:operation: advanced_activity_logs_export_createenabled: false@@ -71,10 +39,12 @@ tools:destructive: falseidempotent: truelist: true- title: List activity logs with advanced filtering.+ title: List activity in the project.description: >- List activity log entries with advanced filtering, sorting, and field-level diffs. Supports filtering by- scope, activity type, user, date range, and search text.+ List activity log entries — who changed what and when (feature flag changes, dashboard edits, experiment+ launches, insight edits, etc.), with field-level diffs. Filter by scope, activity type, user, item, date+ range, and free-text search. Use this to audit a specific resource's history or to see what changed recently+ across the project.param_overrides:page_size:default: 10diff --git a/products/signals/backend/scout_harness/profile/builders.py b/products/signals/backend/scout_harness/profile/builders.pyindex 6c483981b51d..dd41c1f3bb39 100644--- a/products/signals/backend/scout_harness/profile/builders.py+++ b/products/signals/backend/scout_harness/profile/builders.py@@ -680,8 +680,8 @@ def _recent_activity(team: Team) -> dict[str, Any]:Cuts across every entity type the activity log knows about — surveys, feature flags,experiments, dashboards, insights, cohorts, notebooks, actions, etc. — so the agentgets one place to look for "where has this team been working lately?" without per-- entity readers. The MCP tools `activity-log-list` / `advanced-activity-logs-list`- do the drill-down once the agent decides a scope is worth investigating.+ entity readers. The MCP tool `advanced-activity-logs-list`+ does the drill-down once the agent decides a scope is worth investigating.`edits` is total log entries in the window (write velocity). `users` is distinctuser count, so a single power-user looping is distinguishable from broad teamdiff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex ad57bb39dc94..ec61a2776476 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -1303,7 +1303,7 @@ class ProjectProfileInventorySerializer(serializers.Serializer):"experiments, dashboards, insights, cohorts, notebooks, actions, etc.). Each ""scope reports `edits` (total log entries), `users` (distinct user count), ""and `last_edit` (ISO-8601). Use to triage which scope a team has been working "- "in lately before drilling down via the per-entity readers or `activity-log-list`."+ "in lately before drilling down via the per-entity readers or `advanced-activity-logs-list`."),)recent_reviewer_corrections = RecentReviewerCorrectionsSerializer(diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 24b9b82ffa4d..dfdde1ff303b 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1538,7 +1538,7 @@ export interface ProjectProfileInventoryApi {emit_eligibility: EmitEligibilityApi/** Counts of reports already in the inbox, grouped by status. */existing_inbox_reports: ExistingInboxReportsApi- /** Per-scope counts off the activity log over the recent-activity window — cross-cutting orientation across every entity type (surveys, feature flags, experiments, dashboards, insights, cohorts, notebooks, actions, etc.). Each scope reports `edits` (total log entries), `users` (distinct user count), and `last_edit` (ISO-8601). Use to triage which scope a team has been working in lately before drilling down via the per-entity readers or `activity-log-list`. */+ /** Per-scope counts off the activity log over the recent-activity window — cross-cutting orientation across every entity type (surveys, feature flags, experiments, dashboards, insights, cohorts, notebooks, actions, etc.). Each scope reports `edits` (total log entries), `users` (distinct user count), and `last_edit` (ISO-8601). Use to triage which scope a team has been working in lately before drilling down via the per-entity readers or `advanced-activity-logs-list`. */recent_activity: RecentActivityApi/** Recent human edits to report reviewer lists (before/after GitHub logins). The strongest ownership precedent available — check it before setting `suggested_reviewers` and fold what it shows into `reviewer:` memory keys. */recent_reviewer_corrections: RecentReviewerCorrectionsApidiff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 5651012e835e..f174fe08f6b2 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -525,9 +525,9 @@ tools:enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either thenewest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after`skill-get`) to orient on the team in one tool call instead of paginating through- `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `activity-log-list`. Distinct from- `signals-scout-scratchpad-list`: profile is ground truth from authoritative tables; scratchpad is the- scout's inferred learnings.+ `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `advanced-activity-logs-list`.+ Distinct from `signals-scout-scratchpad-list`: profile is ground truth from authoritative tables; scratchpad+ is the scout's inferred learnings.signals-scout-run-now:operation: signals_scout_config_runenabled: truediff --git a/products/signals/skills/inbox-exploration/SKILL.md b/products/signals/skills/inbox-exploration/SKILL.mdindex 4853525d0079..0e80ed1150a6 100644--- a/products/signals/skills/inbox-exploration/SKILL.md+++ b/products/signals/skills/inbox-exploration/SKILL.md@@ -46,7 +46,7 @@ For deeper investigation, hand off to other skills and tools:- Logs: `query-logs`, `logs-count-ranges` to find log activity around the issue- Session replays: `query-session-recordings-list`, `session-recording-get` to findrecordings of affected users- - Persons / activity: `persons-retrieve`, `activity-log-list` to inspect a specific user's+ - Persons / activity: `persons-retrieve`, `advanced-activity-logs-list` to inspect a specific user'sbehavior- Trends / SQL: `query-trends`, `execute-sql` for ad-hoc verification queriesdiff --git a/products/signals/skills/signals-scout-ai-observability/references/lenses.md b/products/signals/skills/signals-scout-ai-observability/references/lenses.mdindex 38fc0205225d..b2158731dea8 100644--- a/products/signals/skills/signals-scout-ai-observability/references/lenses.md+++ b/products/signals/skills/signals-scout-ai-observability/references/lenses.md@@ -152,5 +152,5 @@ LLM/Hog jobs that can silently break.Not a standalone metric — a correlate. When the cost, latency, eval, or tool lens flags achange, check `llma-prompt-list` for a version bump (`updated_at` / `version`) in the same-window. A prompt change is a more direct cause than a generic `activity-log-list` deploy+window. A prompt change is a more direct cause than a generic `advanced-activity-logs-list` deployand sharpens the finding.diff --git a/products/signals/skills/signals-scout-csp-violations/SKILL.md b/products/signals/skills/signals-scout-csp-violations/SKILL.mdindex 32e3d5b2963b..ea4bdbb3310f 100644--- a/products/signals/skills/signals-scout-csp-violations/SKILL.md+++ b/products/signals/skills/signals-scout-csp-violations/SKILL.md@@ -8,7 +8,7 @@ compatibility: >PostHog Signals agent (Claude sandbox). Read-only analytics + signal_scout_internal:write(scratchpad) + signal_scout_report:write (report channel), plus the analytics tools in theMCP tools section (execute-sql over `$csp_violation` events, read-data-schema,- activity-log-list).+ advanced-activity-logs-list).allowed_tools:- emit_report- edit_report@@ -140,7 +140,7 @@ The `blocked_domain != ''` filter already drops the giant inline / `eval` / `uns#### Per-directive burst-Group by `properties.$csp_effective_directive`. A directive whose recent 24h count is materially above its 7d-prior baseline (≥ 3×) with reach across multiple documents is a strong "policy regression after deploy" signal. Pair with `activity-log-list` filtered to the last 24–48h — a deploy or hog-flow change correlating to the burst timestamp is the clean cross-source convergence.+Group by `properties.$csp_effective_directive`. A directive whose recent 24h count is materially above its 7d-prior baseline (≥ 3×) with reach across multiple documents is a strong "policy regression after deploy" signal. Pair with `advanced-activity-logs-list` filtered to the last 24–48h — a deploy or hog-flow change correlating to the burst timestamp is the clean cross-source convergence.Top directives to expect (rough share-of-violations on a typical SPA): `script-src`, `script-src-elem`, `img-src`, `style-src`, `connect-src`, `frame-src`. `script-src` violations are weighted highest for security relevance; `img-src` and `style-src` more often indicate vendor / CDN drift.@@ -208,7 +208,7 @@ Direct calls (read-only):- `execute-sql` against `events` (filtered to `event = '$csp_violation'`) — primary drill-down. Group by `domain($csp_blocked_url)`, `$csp_effective_directive`, `$csp_document_url`, `$csp_source_file`. The full property list is in `posthog/api/csp.py`.- `read-data-schema` (`kind: event_properties`, `event_name: '$csp_violation'`) — discover the team's actual `$csp_*` property surface and sample values.-- `activity-log-list` — pair burst timestamps with recent deploys or feature-flag changes for cross-source convergence. Inbox & reviewer routing (mechanics in `authoring-scouts` → `references/report-contract.md`):+- `advanced-activity-logs-list` — pair burst timestamps with recent deploys or feature-flag changes for cross-source convergence. Inbox & reviewer routing (mechanics in `authoring-scouts` → `references/report-contract.md`):- `inbox-reports-list` / `inbox-reports-retrieve` — the reports already in the inbox. Check your own prior reports (`source_product=signals_scout`) so you edit instead of duplicating, and the push path's raw signals (`source_product=csp_reporting`) so you don't re-state a fingerprint it already covers.- `inbox-report-artefacts-list` — a comparable report's artefact log; reviewer precedent.diff --git a/products/signals/skills/signals-scout-data-pipelines/SKILL.md b/products/signals/skills/signals-scout-data-pipelines/SKILL.mdindex ae6ff7bc4232..ce7b892a6f89 100644--- a/products/signals/skills/signals-scout-data-pipelines/SKILL.md+++ b/products/signals/skills/signals-scout-data-pipelines/SKILL.md@@ -108,7 +108,7 @@ The watcher tracks execution health, not delivery semantics — a destination erFailure share = `failed / triggered` within the same window — never compare either against `filtered`, which is usually orders of magnitude larger and healthy by construction (the filter doing its job). A candidate needs sustained contradiction: share ≥ ~10% over 24h with ≥ ~50 triggered, against a flat-or-quiet history. Two special shapes worth catching:-- **Born broken** — a destination created in the last days failing ~100% since creation (≥ ~20 attempts): a botched setup the team believes is working. `created_at` is in the list response; the activity log (`scope: "HogFunction"`) dates config edits.+- **Born broken** — a destination created in the last days failing ~100% since creation (≥ ~20 attempts): a botched setup the team believes is working. `created_at` is in the list response; the activity log (`scopes: ["HogFunction"]`) dates config edits.- **Filter starvation** — `triggered` collapsing to ~zero while `filtered` keeps flowing: the filter stopped matching, usually because an upstream event was renamed or stopped firing. The destination isn't failing — it's starving. Confirm the filtered events still exist before calling it (one `execute-sql` count on the filter's event).#### Batch export failures and stalls@@ -118,7 +118,7 @@ For each live export, read the 10 `latest_runs` off `batch-export-get`:- **`Failed` runs** are terminal — retries exhausted; that interval's data did not land and won't until someone backfills. `latest_error` carries the reason (auth expiry, schema mismatch, destination quota). One `Failed` run is already a data gap; file a report with the interval bounds. `FailedRetryable` / `Running` / `Starting` are in-flight states — not findings.- **Stalls** — compare the newest run's `data_interval_end` against now: a gap over ~2× the export interval with no running run means the schedule itself stopped.- **Record-level failures** — `records_failed > 0` on Completed runs: partial delivery, worth a memory entry and a report only if it grows or persists.-- **Volume cliffs** — `records_completed` collapsing across consecutive runs while event ingestion held steady points at a filter/config change; check `last_updated_at` and the activity log (`scope: "BatchExport"`) before calling it unexplained.+- **Volume cliffs** — `records_completed` collapsing across consecutive runs while event ingestion held steady points at a filter/config change; check `last_updated_at` and the activity log (`scopes: ["BatchExport"]`) before calling it unexplained.#### Flow failure concentration (hog flows)@@ -198,7 +198,7 @@ Direct calls (read-only):- `workflows-global-stats` — per-flow succeeded/failed for the whole fleet in one call, most-failing first. Hog flows only — it does not cover destinations.- `workflows-stats` / `workflows-list-invocations` / `workflows-logs` — one flow's time series, per-recipient outcomes (`error_kind`, `error_message`, `person_id`), and step trace.- `execute-sql` against `system.hog_functions`, `system.hog_flows`, `system.batch_exports` — bulk roster reads without pagination (name your columns; no watcher state here; integer booleans).-- `activity-log-list` (`scope: "HogFunction"` / `"HogFlow"` / `"BatchExport"`) — dating config edits against delivery shifts.+- `advanced-activity-logs-list` (`scopes: ["HogFunction"]` / `["HogFlow"]` / `["BatchExport"]`) — dating config edits against delivery shifts.Inbox & reviewer routing:diff --git a/products/signals/skills/signals-scout-data-warehouse/SKILL.md b/products/signals/skills/signals-scout-data-warehouse/SKILL.mdindex 0ebe1c94c2ee..e49ec97af355 100644--- a/products/signals/skills/signals-scout-data-warehouse/SKILL.md+++ b/products/signals/skills/signals-scout-data-warehouse/SKILL.md@@ -13,7 +13,7 @@ description: >compatibility: >PostHog Signals agent (Claude sandbox). Read-only analytics + signal_scout_internal:write(scratchpad) + signal_scout_report:write (report channel), plus the external-data- source/schema/webhook tools, view tools, execute-sql, activity-log-list, and inbox tools+ source/schema/webhook tools, view tools, execute-sql, advanced-activity-logs-list, and inbox toolsin the MCP tools section.allowed_tools:- emit_report@@ -106,7 +106,7 @@ A source at `status: Error`/`Failed` breaks every armed schema under it — cred#### Schema failures and stalls (the growing gap)-For each armed `Failed` schema, the `latest_error` names the root cause and decides who fixes it: `authentication failed`/`401` (creds), `column "X" does not exist` / `does not have a column named` (schema drift), `Primary key required` / `primary keys ... not unique` (incremental/PK misconfig), `replication slot` / `publication` / `wal_level` (CDC prerequisites — e.g. a slot invalidated for exceeding max reserved size), `timeout` / `query_wait_timeout` / `QueryTimeoutException` (an incremental field with no index, or an overloaded source), `Schema exceeds row limit` (billing). Date the onset from `activity-log-list` (`scope` for the source/schema) and quantify the gap (intervals missed × `sync_frequency`). A schema **stuck in `Running`** with a `last_synced_at` hours old is an orphaned job — the same growing-gap finding, not a healthy state.+For each armed `Failed` schema, the `latest_error` names the root cause and decides who fixes it: `authentication failed`/`401` (creds), `column "X" does not exist` / `does not have a column named` (schema drift), `Primary key required` / `primary keys ... not unique` (incremental/PK misconfig), `replication slot` / `publication` / `wal_level` (CDC prerequisites — e.g. a slot invalidated for exceeding max reserved size), `timeout` / `query_wait_timeout` / `QueryTimeoutException` (an incremental field with no index, or an overloaded source), `Schema exceeds row limit` (billing). Date the onset from `advanced-activity-logs-list` (`scopes` for the source/schema) and quantify the gap (intervals missed × `sync_frequency`). A schema **stuck in `Running`** with a `last_synced_at` hours old is an orphaned job — the same growing-gap finding, not a healthy state.#### Silent staleness (Completed but behind cadence)@@ -192,7 +192,7 @@ REST (per-candidate detail the system tables don't carry):- `external-data-schemas-retrieve` — one schema's columns / `sync_type_config` when the sweep's `latest_error` is null but the schema is `Failed`.- `external-data-sources-webhook-info-retrieve` — per-source webhook registration + remote status for `sync_type: webhook` schemas; the only place push-channel health shows.- `view-list` / `view-run-history` — materialized-view `latest_error` and the run trail when a `system.data_modeling_views` row is `Failed`.-- `activity-log-list` — dating source/schema config edits against a failure or staleness onset.+- `advanced-activity-logs-list` — dating source/schema config edits against a failure or staleness onset.Inbox & reviewer routing:diff --git a/products/signals/skills/signals-scout-error-tracking/SKILL.md b/products/signals/skills/signals-scout-error-tracking/SKILL.mdindex 0387c9f7e2bd..c5d74750a886 100644--- a/products/signals/skills/signals-scout-error-tracking/SKILL.md+++ b/products/signals/skills/signals-scout-error-tracking/SKILL.md@@ -8,7 +8,7 @@ compatibility: >PostHog Signals agent (Claude sandbox). Read-only analytics + signal_scout_internal:write(scratchpad) + signal_scout_report:write (report channel), plus the error-tracking tools inthe MCP tools section (query-error-tracking-issues-list / -issue, execute-sql over the- events table, activity-log-list).+ events table, advanced-activity-logs-list).allowed_tools:- emit_report- edit_report@@ -83,7 +83,7 @@ An issue with `status=resolved` that's now firing again. Filter `query-error-tra#### Stack-trace activity name-When the issue is server-side, the stack trace usually names the failing activity / view / management command. Extract it (top frame, look for `<activity>_activity`, `def view_name`, etc.) and pair with `activity-log-list` to find a recent deploy or model change correlation. Cross-source convergence is where this scout earns its keep.+When the issue is server-side, the stack trace usually names the failing activity / view / management command. Extract it (top frame, look for `<activity>_activity`, `def view_name`, etc.) and pair with `advanced-activity-logs-list` to find a recent deploy or model change correlation. Cross-source convergence is where this scout earns its keep.### Save memory as you go@@ -103,7 +103,7 @@ By run #5 you'll have a local map of what's normal versus what warrants investigThe generic report mechanics — search the inbox first (via the `report:error_tracking:<issue_id>` pointer, else an `inbox-reports-list` search on the issue's _specific_ terms — the issue id, the fingerprint, the failing activity name, not a broad word like `error`), edit-vs-author, the status rules, reviewer routing, non-idempotent dedup, and the `priority` / `repository` / actionability fields — live in the harness prompt and in `authoring-scouts` → `references/report-contract.md`. Do not re-derive them here. This section is only the error-tracking judgment layered on top:- **Edit** when a still-live report already tracks the same issue and it's still moving — a burst still elevated, a stuck loop still looping, a cluster still growing. A persistent issue is one report across runs: a fresh window confirming it's ongoing is a re-escalation (`append_note` the fresh hourly counts and distinct-user numbers), not a new report per tick. A **status regression** is the exception — an issue the team explicitly `resolved` that's firing again is a genuinely new event; if its prior report is already closed, author a fresh report (per the status rules) and repoint `report:error_tracking:<issue_id>` rather than appending to a resolved item.-- **Author** when nothing live covers the issue. A report-worthy finding names the issue (issue id + fingerprint), shows the count-vs-distinct_users shape that makes it signal, quantifies the burst against baseline with an hourly breakdown, dates the onset, and — when the stack trace names a server activity / view — cites it with an `activity-log-list` deploy correlation, all in the `evidence`. Most findings are investigations → `actionability=requires_human_input` + `repository=NO_REPO`. The exception this surface earns: a well-localized bug whose stack trace points at a specific named file / module in a known repo can be `actionability=immediately_actionable` + `repository=owner/repo` to open a draft fix PR. Priority: a fresh broad-reach regression (count and distinct_users both spiking, per-request server path) or a resolved-issue status regression is **P1**, **P2** when reach is moderate; a stuck loop or narrow-reach cluster is **P3**, **P2** when count is in the thousands and fresh.+- **Author** when nothing live covers the issue. A report-worthy finding names the issue (issue id + fingerprint), shows the count-vs-distinct_users shape that makes it signal, quantifies the burst against baseline with an hourly breakdown, dates the onset, and — when the stack trace names a server activity / view — cites it with an `advanced-activity-logs-list` deploy correlation, all in the `evidence`. Most findings are investigations → `actionability=requires_human_input` + `repository=NO_REPO`. The exception this surface earns: a well-localized bug whose stack trace points at a specific named file / module in a known repo can be `actionability=immediately_actionable` + `repository=owner/repo` to open a draft fix PR. Priority: a fresh broad-reach regression (count and distinct_users both spiking, per-request server path) or a resolved-issue status regression is **P1**, **P2** when reach is moderate; a stuck loop or narrow-reach cluster is **P3**, **P2** when count is in the thousands and fresh.- **Remember** if it's below the bar but worth carrying forward (an issue drifting inside the noise band, a fingerprint building history), or to record what you ruled out and why.- **Skip** with a one-line note if a `noise:` / `addressed:` / `dedupe:` entry, or an existing inbox report, already covers it.@@ -128,7 +128,7 @@ Direct calls (read-only):- `query-error-tracking-issues-list` — start here. Filter `status=active`, sort by `last_seen_at` desc.- `query-error-tracking-issue` — drill into one issue (frames, sample events, occurrence counts).- `execute-sql` against `events` — for hourly breakdowns, distinct-user counts, per-fingerprint correlation, time-window aggregations.-- `activity-log-list` — pair stack-trace activity names with recent deploys or model changes for cross-source convergence.+- `advanced-activity-logs-list` — pair stack-trace activity names with recent deploys or model changes for cross-source convergence.Inbox & reviewer routing (mechanics in `authoring-scouts` → `references/report-contract.md`):diff --git a/products/signals/skills/signals-scout-experiments/SKILL.md b/products/signals/skills/signals-scout-experiments/SKILL.mdindex eb3f14943da5..e552e7d7c07b 100644--- a/products/signals/skills/signals-scout-experiments/SKILL.md+++ b/products/signals/skills/signals-scout-experiments/SKILL.md@@ -159,7 +159,7 @@ GROUP BY day ORDER BY day```- **Zero ever, launched > 24h ago** — broken wiring: the SDK method used doesn't record `$feature_flag_called` (bulk accessors like `getAllFlags()` don't), the flag is at 0% rollout or inactive, or a custom exposure event is missing its `$feature/<flag-key>` property. Check `experiment-get`'s flag state before filing a report — a **paused** experiment (flag deactivated, status "paused") legitimately has no fresh exposures. And before diagnosing a custom-exposure experiment as dormant, confirm with both signals: the custom event by `$feature/<flag-key>` **and** `$feature_flag_called` for the flag — if the flag is being called but the custom event never fires, the break is in the custom event wiring, not the experiment.-- **Healthy baseline then a cliff to ~zero** — the flag-reading call was removed from code, or an upstream deploy broke the path. Date the cliff; cross-check `activity-log-list` and `feature-flags-activity-retrieve` around it.+- **Healthy baseline then a cliff to ~zero** — the flag-reading call was removed from code, or an upstream deploy broke the path. Date the cliff; cross-check `advanced-activity-logs-list` and `feature-flags-activity-retrieve` around it.- **Asymptotic plateau after weeks** (e.g. +4 exposures over 100 days) — the eligible audience is exhausted; the experiment is done recruiting. Fold into the zombie check.#### Mid-run flag mutation@@ -171,7 +171,7 @@ GROUP BY day ORDER BY day- Release-condition tightening, bucketing-key change, variant key rename — all rebucket.- `active` flips date pause/resume windows — context for stalls, usually deliberate.-Also `activity-log-list {scope: "Experiment", item_id: <id>}` for experiment-level edits (exposure criteria swaps, metric changes near a decision point).+Also `advanced-activity-logs-list {scopes: ["Experiment"], item_ids: [<id>]}` for experiment-level edits (exposure criteria swaps, metric changes near a decision point).#### Lifecycle drift (zombie / decided / lingering flags)@@ -235,7 +235,7 @@ Direct calls (read-only):- `experiment-stats` — project-wide velocity aggregate (launched / completed last 30d, active count). Cheap context for the hygiene pass.- `experiment-timeseries-results` — day-by-day per-variant results for one metric (`metric_uuid` + `fingerprint` from the metrics array). Use sparingly, for the zombie "decide now" check.- `feature-flag-get-definition` / `feature-flags-activity-retrieve` — flag state and edit-history diffs; the latter is how you date mid-run mutations.-- `activity-log-list` (`scope: "Experiment"`) — experiment-level edit timeline.+- `advanced-activity-logs-list` (`scopes: ["Experiment"]`) — experiment-level edit timeline.- `execute-sql` against `events` — exposure analysis. Properties: `$feature_flag` (flag key) + `$feature_flag_response` (variant, incl. `$multiple`) on `$feature_flag_called`; `$feature/<flag-key>` on custom exposure events.- `read-data-schema` — confirm a custom exposure event and its properties exist before aggregating over them.diff --git a/products/signals/skills/signals-scout-feature-flags/SKILL.md b/products/signals/skills/signals-scout-feature-flags/SKILL.mdindex 5a84ea829b0b..e5f7435352a2 100644--- a/products/signals/skills/signals-scout-feature-flags/SKILL.md+++ b/products/signals/skills/signals-scout-feature-flags/SKILL.md@@ -138,7 +138,7 @@ LIMIT 50Two ghost classes come back, with different stories:-- **Soft-deleted but still called** — the key exists in `system.feature_flags` with `deleted = 1`. `activity-log-list {scope: "FeatureFlag"}` can often date the deletion; calls continuing after it measure exactly how stale the shipped code is. Before authoring, pull the deleted row's `id` from `system.feature_flags` and call `feature-flag-get-definition` — the list endpoint hides deleted flags, and a deleted flag can still be experiment-linked (`experiment_set`): lingering experiment flags belong to the experiments scout, not your ghost finding.+- **Soft-deleted but still called** — the key exists in `system.feature_flags` with `deleted = 1`. `advanced-activity-logs-list {scopes: ["FeatureFlag"]}` can often date the deletion; calls continuing after it measure exactly how stale the shipped code is. Before authoring, pull the deleted row's `id` from `system.feature_flags` and call `feature-flag-get-definition` — the list endpoint hides deleted flags, and a deleted flag can still be experiment-linked (`experiment_set`): lingering experiment flags belong to the experiments scout, not your ghost finding.- **Absent entirely** — no row at any `deleted` value: the flag was hard-deleted or the code shipped a check for a flag that was never created. These can run shockingly hot (six-figure weekly calls) because nothing in the flag UI ever surfaces them.Sustained volume (≥ ~100 calls/day) is the bar. Before claiming either class, confirm with `feature-flag-get-all {"search": "<key>"}` that the key isn't renamed, freshly created mid-window, or visible to the API but not the system table — the REST roster is the authority when the two disagree. The finding: name the key, the call volume and reach (`persons_7d`), how long it's been orphaned, and what the silent fallback means (users get the off path).@@ -163,7 +163,7 @@ Compare each response's **share within its own window**, never the raw countsA material shift (e.g. a 25% rollout flag suddenly serving `false` to ~everyone, a variant's share collapsing) is signal **only without a matching edit** — check `feature-flags-activity-retrieve` first. No edit + shifted responses points at condition drift: a release condition keyed on a person/group property whose real-world values changed (a cohort emptied, a property stopped being set upstream). Confirm the mechanism with `feature-flag-get-definition` (read the `filters` groups) and one SQL count on the targeted property before authoring — a distribution shift you can't mechanically explain is a `pattern:` memory, not a finding.-**Cohort-targeted flags hide their edits:** if `filters` reference a cohort, a cohort definition update changes the response mix with **no** `FeatureFlag` activity entry. Check `activity-log-list {scope: "Cohort", item_id: <cohort-id>}` before calling drift — an intentional cohort edit near the shift is deliberate maintenance (context, not a finding).+**Cohort-targeted flags hide their edits:** if `filters` reference a cohort, a cohort definition update changes the response mix with **no** `FeatureFlag` activity entry. Check `advanced-activity-logs-list {scopes: ["Cohort"], item_ids: [<cohort-id>]}` before calling drift — an intentional cohort edit near the shift is deliberate maintenance (context, not a finding).#### Flag-debt hygiene (P3 bundle)@@ -241,7 +241,7 @@ Direct calls (read-only):- `feature-flags-status-retrieve` — health status (`active` / `stale` / `deleted` / `unknown`) with a human-readable reason; good for citing staleness precisely.- `feature-flags-activity-retrieve` — one flag's edit history with diffs; how you date edits against traffic shifts.- `feature-flags-dependent-flags-retrieve` — flags whose conditions reference this one; cleanup-safety check for the debt bundle.-- `activity-log-list` (`scope: "FeatureFlag"`) — project-wide flag change timeline, including deletions that `feature-flags-activity-retrieve` can't reach anymore.+- `advanced-activity-logs-list` (`scopes: ["FeatureFlag"]`) — project-wide flag change timeline, including deletions that `feature-flags-activity-retrieve` can't reach anymore.- `execute-sql` against `events` — the traffic side. Properties on `$feature_flag_called`: `$feature_flag` (key), `$feature_flag_response` (`true`/`false`/variant key).- `execute-sql` against `system.feature_flags` — the bulk roster side (`id`, `key`, `name`, `filters`, `rollout_percentage`, `deleted`; no `active` column). Powers the ghost anti-join and any roster-wide aggregation without pagination.- `read-data-schema` — confirm `$feature_flag_called` exists and check property shape before aggregating.diff --git a/products/signals/skills/signals-scout-session-replay/SKILL.md b/products/signals/skills/signals-scout-session-replay/SKILL.mdindex a9488b62e65f..70bf18502967 100644--- a/products/signals/skills/signals-scout-session-replay/SKILL.md+++ b/products/signals/skills/signals-scout-session-replay/SKILL.md@@ -138,7 +138,7 @@ Before any per-URL deep dive, normalize against the whole stream: if total `$ragFrom the orientation join, a cliff candidate is a day (or the live partial day) where `capture_ratio` dropped below ~40% of its 14-day norm while `event_sessions` held within ~25% of its own norm. Require an established baseline (≥ ~100 recordings/day across ≥ 7 days) — low-volume projects wobble. Then explain it before emitting:-- `advanced-activity-logs-list` (`scopes: ["Team"]`, `start_date`/`end_date` bracketing the cliff — the plain `activity-log-list` has no date filter and can page past an older edit) — recording settings live on the team: look for edits to sampling, minimum duration, URL triggers/blocklists, or opt-out near the cliff date. A matching edit means deliberate; cite it as context and stop.+- `advanced-activity-logs-list` (`scopes: ["Team"]`, `start_date`/`end_date` bracketing the cliff) — recording settings live on the team: look for edits to sampling, minimum duration, URL triggers/blocklists, or opt-out near the cliff date. A matching edit means deliberate; cite it as context and stop.- SDK-side diagnosis from the event stream — recent events carry replay health properties: `$recording_status`, `$replay_sample_rate` (did the client-observed rate change on the cliff date?), `$sdk_debug_recording_script_not_loaded` (ad blockers / CSP blocking the recorder bundle). Group by `$lib_version` — a cliff aligned to one SDK version is a release regression; say so in the finding.- Slice by `$host` and platform (web vs mobile SDKs) — a cliff scoped to one host or one platform points at that surface's deploy, not the whole pipeline.@@ -298,7 +298,7 @@ Direct calls (read-only):- `session-recording-summaries-list` / `session-recording-summary-get` — stored AI summaries (list filters: `session_ids`, `has_exceptions`, `outcome`; get returns segment-level detail). A 404 just means no summary exists — never trigger generation.- `heatmaps-list` / `heatmaps-events` — spatial corroboration for a cluster. Feature-gated: skip silently if absent.- `vision-scanners-list` / `vision-scanners-observations-list` / `vision-observations-list` / `vision-quota-retrieve` — scanner config, observation health, and quota. Feature-gated and often absent even where replay vision is in use — lead with `$recording_observed` SQL; these are the optional mechanism-confirmation layer.-- `advanced-activity-logs-list` (`scopes: ["Team"]` + `start_date`/`end_date`) — dating recording-config changes against capture cliffs; prefer it over `activity-log-list`, which cannot filter by date.+- `advanced-activity-logs-list` (`scopes: ["Team"]` + `start_date`/`end_date`) — dating recording-config changes against capture cliffs.- `read-data-schema` — confirm `$rageclick` / `$dead_click` / replay SDK properties exist before aggregating. Inbox & reviewer routing (mechanics in `authoring-scouts` → `references/report-contract.md`):- `inbox-reports-list` / `inbox-reports-retrieve` — the reports already in the inbox (native replay signals and scanner-emitted findings land here too); check before authoring so you edit instead of duplicating.diff --git a/products/signals/skills/signals-scout-surveys/SKILL.md b/products/signals/skills/signals-scout-surveys/SKILL.mdindex bbc855e5b900..6958e31d48cc 100644--- a/products/signals/skills/signals-scout-surveys/SKILL.md+++ b/products/signals/skills/signals-scout-surveys/SKILL.md@@ -185,7 +185,7 @@ A survey created > 90 days ago with steadily declining response volume and no `u#### Theme correlated with recent change-When a theme emerges, cross-check `activity-log-list` for the period around the inflection. If a deploy / flag flip / feature change in the same week matches the theme content, the finding lands much harder ("4 users complained about checkout slowness on $date; deploy of `checkout-rewrite-v2` flag rolled to 100% on $date-1"). Timing is hint, not proof — say "matches" rather than "caused by".+When a theme emerges, cross-check `advanced-activity-logs-list` for the period around the inflection. If a deploy / flag flip / feature change in the same week matches the theme content, the finding lands much harder ("4 users complained about checkout slowness on $date; deploy of `checkout-rewrite-v2` flag rolled to 100% on $date-1"). Timing is hint, not proof — say "matches" rather than "caused by".#### Theme drift across survey iterations@@ -256,7 +256,7 @@ Direct calls (read-only):- `execute-sql` against `events` — for raw response analysis (rating trends, theme aggregation). The property reference, the dual response-key coalesce, and the `$survey_submission_id` dedupe SQL are all in [`references/response-querying.md`](references/response-querying.md).- `read-data-schema event_property_values` — sample response values to confirm property keys exist and have the shape you expect before running heavy aggregations.- `query-trends` — confirm `survey shown` / `survey sent` volume trends with weekly comparisons. Cheaper than a full SQL aggregation when you just need the shape.-- `activity-log-list` — correlate themes / score drops with recent product changes.+- `advanced-activity-logs-list` — correlate themes / score drops with recent product changes.- `inbox-reports-list` / `inbox-reports-retrieve` — the reports already in the inbox; check before authoring so you edit instead of duplicating (`ordering=-updated_at`).- `inbox-report-artefacts-list` — a comparable report's artefact log, where the routed `suggested_reviewers` live (the report record doesn't expose them) — reviewer precedent.- `signals-scout-members-list` — this project's members with their resolved `github_login`, to route `suggested_reviewers` to a survey's owner (null `github_login` → can't route, try the next owner). The in-run roster; the org-scoped resolver tools aren't available in a scout run.diff --git a/products/signals/skills/signals-scout-web-vitals/SKILL.md b/products/signals/skills/signals-scout-web-vitals/SKILL.mdindex 42c5dd88d1c4..bdfccf51ce46 100644--- a/products/signals/skills/signals-scout-web-vitals/SKILL.md+++ b/products/signals/skills/signals-scout-web-vitals/SKILL.md@@ -16,7 +16,7 @@ compatibility: >emit-signal). Assumes the signals-scout MCP family (project-profile-get, runs-list,scratchpad-search, scratchpad-remember, scratchpad-forget, emit-signal) plus standardanalytics tools (execute-sql against the events table, read-data-schema,- activity-log-list, inbox-reports-list).+ advanced-activity-logs-list, inbox-reports-list).metadata:owner_team: signalsscope: web_vitals@@ -262,7 +262,7 @@ candidate — with an empty or tiny prior window there's no baseline to regressnew or freshly-popular page would look like a band cross. Judge those on their absoluteband through the standing-poor path instead; don't date them as a deploy regression. Thenpull a 30-day daily p75 series for that one path (`toStartOfDay(timestamp)`, same filters,-`GROUP BY day`) to find the step day, and correlate with `activity-log-list` over the same+`GROUP BY day`) to find the step day, and correlate with `advanced-activity-logs-list` over the samewindow. You usually can't see the team'sdeploys — frame it as "consistent with a change around {day}, confirm against yourrelease log".@@ -394,7 +394,7 @@ Direct calls (read-only):`$device_type` / `$geoip_country_code` / `$browser`. Metrics: `LCP`, `INP`, `CLS`, `FCP`.- `read-data-schema` (`kind: event_properties`, `event_name: '$web_vitals'`) — confirm theteam's captured `$web_vitals_*` properties and sample values before aggregating.-- `activity-log-list` — pair a dated regression onset with recent deploys or flag changes+- `advanced-activity-logs-list` — pair a dated regression onset with recent deploys or flag changesfor cross-source convergence.- `inbox-reports-list` — pre-emit dedupe against the inbox.diff --git a/products/signals/skills/signals-scout-web-vitals/references/remediation.md b/products/signals/skills/signals-scout-web-vitals/references/remediation.mdindex 2505db43649f..f96f03067d36 100644--- a/products/signals/skills/signals-scout-web-vitals/references/remediation.md+++ b/products/signals/skills/signals-scout-web-vitals/references/remediation.md@@ -19,7 +19,7 @@ slice the same `$web_vitals` data:- **By `$browser`** — a regression isolated to one engine is often a polyfill, a CSSfeature, or a JS API doing extra work there.- **For a regression, date the onset** with a daily p75 series and line it up against- `activity-log-list`. "Stepped on {day}, consistent with a deploy" is the most actionable+ `advanced-activity-logs-list`. "Stepped on {day}, consistent with a deploy" is the most actionableframing — but you usually can't see their releases, so frame it as correlation to confirm.A regression that holds across every device/region/browser slice is a real shared causediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 08dce455edfe..99d4eee505b1 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -234,20 +234,6 @@"readOnlyHint": true}},- "activity-log-list": {- "description": "List recent activity log entries for the project. Shows who did what and when — feature flag changes, dashboard edits, experiment launches, etc. Supports filtering by scope, user, and date range.",- "category": "Platform Features",- "feature": "platform_features",- "summary": "List recent activity in the project.",- "title": "List recent activity in the project.",- "required_scopes": ["activity_log:read"],- "annotations": {- "destructiveHint": false,- "idempotentHint": true,- "openWorldHint": true,- "readOnlyHint": true- }- },"advanced-activity-logs-filters": {"description": "Get the available filter options for activity logs — scopes, activity types, and users that have logged activity. Useful for building filter UIs or understanding what kinds of activity are tracked.","category": "Platform Features",@@ -263,11 +249,11 @@}},"advanced-activity-logs-list": {- "description": "List activity log entries with advanced filtering, sorting, and field-level diffs. Supports filtering by scope, activity type, user, date range, and search text.",+ "description": "List activity log entries — who changed what and when (feature flag changes, dashboard edits, experiment launches, insight edits, etc.), with field-level diffs. Filter by scope, activity type, user, item, date range, and free-text search. Use this to audit a specific resource's history or to see what changed recently across the project.","category": "Platform Features","feature": "platform_features",- "summary": "List activity logs with advanced filtering.",- "title": "List activity logs with advanced filtering.",+ "summary": "List activity in the project.",+ "title": "List activity in the project.","required_scopes": ["activity_log:read"],"annotations": {"destructiveHint": false,@@ -7098,7 +7084,7 @@}},"signals-scout-project-profile-get": {- "description": "Return a deterministic snapshot of \"what's true about this project\" — products in use, product intents (stuck onboardings), connected integrations, warehouse sources, signal source configs (split enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either the newest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after `skill-get`) to orient on the team in one tool call instead of paginating through `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `activity-log-list`. Distinct from `signals-scout-scratchpad-list`: profile is ground truth from authoritative tables; scratchpad is the scout's inferred learnings.",+ "description": "Return a deterministic snapshot of \"what's true about this project\" — products in use, product intents (stuck onboardings), connected integrations, warehouse sources, signal source configs (split enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either the newest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after `skill-get`) to orient on the team in one tool call instead of paginating through `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `advanced-activity-logs-list`. Distinct from `signals-scout-scratchpad-list`: profile is ground truth from authoritative tables; scratchpad is the scout's inferred learnings.","category": "Signals","feature": "signals","summary": "Get the project profile",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex eec9b5fd39ff..93a871afff89 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -234,20 +234,6 @@"readOnlyHint": true}},- "activity-log-list": {- "description": "List recent activity log entries for the project. Shows who did what and when — feature flag changes, dashboard edits, experiment launches, etc. Supports filtering by scope, user, and date range.",- "category": "Platform Features",- "feature": "platform_features",- "summary": "List recent activity in the project.",- "title": "List recent activity in the project.",- "required_scopes": ["activity_log:read"],- "annotations": {- "destructiveHint": false,- "idempotentHint": true,- "openWorldHint": true,- "readOnlyHint": true- }- },"advanced-activity-logs-filters": {"description": "Get the available filter options for activity logs — scopes, activity types, and users that have logged activity. Useful for building filter UIs or understanding what kinds of activity are tracked.","category": "Platform Features",@@ -263,11 +249,11 @@}},"advanced-activity-logs-list": {- "description": "List activity log entries with advanced filtering, sorting, and field-level diffs. Supports filtering by scope, activity type, user, date range, and search text.",+ "description": "List activity log entries — who changed what and when (feature flag changes, dashboard edits, experiment launches, insight edits, etc.), with field-level diffs. Filter by scope, activity type, user, item, date range, and free-text search. Use this to audit a specific resource's history or to see what changed recently across the project.","category": "Platform Features","feature": "platform_features",- "summary": "List activity logs with advanced filtering.",- "title": "List activity logs with advanced filtering.",+ "summary": "List activity in the project.",+ "title": "List activity in the project.","required_scopes": ["activity_log:read"],"annotations": {"destructiveHint": false,@@ -7609,7 +7595,7 @@}},"signals-scout-project-profile-get": {- "description": "Return a deterministic snapshot of \"what's true about this project\" — products in use, product intents (stuck onboardings), connected integrations, warehouse sources, signal source configs (split enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either the newest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after `skill-get`) to orient on the team in one tool call instead of paginating through `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `activity-log-list`. Distinct from `signals-scout-scratchpad-list`: profile is ground truth from authoritative tables; scratchpad is the scout's inferred learnings.",+ "description": "Return a deterministic snapshot of \"what's true about this project\" — products in use, product intents (stuck onboardings), connected integrations, warehouse sources, signal source configs (split enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either the newest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after `skill-get`) to orient on the team in one tool call instead of paginating through `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `advanced-activity-logs-list`. Distinct from `signals-scout-scratchpad-list`: profile is ground truth from authoritative tables; scratchpad is the scout's inferred learnings.","category": "Signals","feature": "signals","summary": "Get the project profile",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex c114eb14c4c6..2ed3e544c30e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -46181,7 +46181,7 @@ export namespace Schemas {emit_eligibility: EmitEligibility;/** Counts of reports already in the inbox, grouped by status. */existing_inbox_reports: ExistingInboxReports;- /** Per-scope counts off the activity log over the recent-activity window — cross-cutting orientation across every entity type (surveys, feature flags, experiments, dashboards, insights, cohorts, notebooks, actions, etc.). Each scope reports `edits` (total log entries), `users` (distinct user count), and `last_edit` (ISO-8601). Use to triage which scope a team has been working in lately before drilling down via the per-entity readers or `activity-log-list`. */+ /** Per-scope counts off the activity log over the recent-activity window — cross-cutting orientation across every entity type (surveys, feature flags, experiments, dashboards, insights, cohorts, notebooks, actions, etc.). Each scope reports `edits` (total log entries), `users` (distinct user count), and `last_edit` (ISO-8601). Use to triage which scope a team has been working in lately before drilling down via the per-entity readers or `advanced-activity-logs-list`. */recent_activity: RecentActivity;/** Recent human edits to report reviewer lists (before/after GitHub logins). The strongest ownership precedent available — check it before setting `suggested_reviewers` and fold what it shows into `reviewer:` memory keys. */recent_reviewer_corrections: RecentReviewerCorrections;diff --git a/services/mcp/src/generated/platform_features/api.ts b/services/mcp/src/generated/platform_features/api.tsindex 35672815652b..af094ddf3c5e 100644--- a/services/mcp/src/generated/platform_features/api.ts+++ b/services/mcp/src/generated/platform_features/api.ts@@ -3,7 +3,7 @@* MCP service uses these Zod schemas for generated tool handlers.* To regenerate: hogli build:openapi*- * PostHog API - MCP 20 enabled ops+ * PostHog API - MCP 19 enabled ops* OpenAPI spec version: 1.0.0*/import * as zod from 'zod'@@ -82,187 +82,6 @@ export const RolesRoleMembershipsListQueryParams = /* @__PURE__ */ zod.object({offset: zod.number().optional().describe('The initial index from which to return the results.'),})-export const ActivityLogListParams = /* @__PURE__ */ 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 activityLogListQueryPageSizeDefault = 100-export const activityLogListQueryPageSizeMax = 1000--export const ActivityLogListQueryParams = /* @__PURE__ */ zod.object({- item_id: zod.string().min(1).optional().describe('Filter by the ID of the affected resource.'),- page: zod- .number()- .min(1)- .optional()- .describe(- 'Page number for pagination. When provided, uses page-based pagination ordered by most recent first.'- ),- page_size: zod- .number()- .min(1)- .max(activityLogListQueryPageSizeMax)- .default(activityLogListQueryPageSizeDefault)- .describe('Number of results per page (default: 100, max: 1000). Only used with page-based pagination.'),- scope: zod- .enum([- 'Cohort',- 'FeatureFlag',- 'Person',- 'Group',- 'Insight',- 'Plugin',- 'PluginConfig',- 'HogFunction',- 'HogFlow',- 'DataManagement',- 'EventDefinition',- 'PropertyDefinition',- 'Notebook',- 'Endpoint',- 'EndpointVersion',- 'Dashboard',- 'Replay',- 'Experiment',- 'ExperimentHoldout',- 'ExperimentSavedMetric',- 'Survey',- 'EarlyAccessFeature',- 'SessionRecordingPlaylist',- 'Comment',- 'Team',- 'Project',- 'ErrorTrackingIssue',- 'DataWarehouseSavedQuery',- 'LegalDocument',- 'Organization',- 'OrganizationDomain',- 'OrganizationMembership',- 'Role',- 'UserGroup',- 'BatchExport',- 'BatchImport',- 'ExportedAsset',- 'Integration',- 'Annotation',- 'Tag',- 'TaggedItem',- 'Subscription',- 'PersonalAPIKey',- 'ProjectSecretAPIKey',- 'OAuthApplication',- 'User',- 'Action',- 'AlertConfiguration',- 'Threshold',- 'AlertSubscription',- 'ExternalDataSource',- 'ExternalDataSchema',- 'Evaluation',- 'LLMTrace',- 'AIGatewayCredit',- 'WebAnalyticsFilterPreset',- 'CustomerProfileConfig',- 'Log',- 'LogsAlertConfiguration',- 'LogsExclusionRule',- 'DashboardWidget',- 'ProductTour',- 'Ticket',- 'InstanceSetting',- 'SignalReport',- 'SignalScoutConfig',- ])- .optional()- .describe(- 'Filter by a single activity scope, e.g. "FeatureFlag", "Insight", "Dashboard", "Experiment".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `ExportedAsset` - ExportedAsset\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `OAuthApplication` - OAuthApplication\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `AIGatewayCredit` - AIGatewayCredit\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting\n* `SignalReport` - SignalReport\n* `SignalScoutConfig` - SignalScoutConfig'- ),- scopes: zod- .array(- zod- .enum([- 'Cohort',- 'FeatureFlag',- 'Person',- 'Group',- 'Insight',- 'Plugin',- 'PluginConfig',- 'HogFunction',- 'HogFlow',- 'DataManagement',- 'EventDefinition',- 'PropertyDefinition',- 'Notebook',- 'Endpoint',- 'EndpointVersion',- 'Dashboard',- 'Replay',- 'Experiment',- 'ExperimentHoldout',- 'ExperimentSavedMetric',- 'Survey',- 'EarlyAccessFeature',- 'SessionRecordingPlaylist',- 'Comment',- 'Team',- 'Project',- 'ErrorTrackingIssue',- 'DataWarehouseSavedQuery',- 'LegalDocument',- 'Organization',- 'OrganizationDomain',- 'OrganizationMembership',- 'Role',- 'UserGroup',- 'BatchExport',- 'BatchImport',- 'ExportedAsset',- 'Integration',- 'Annotation',- 'Tag',- 'TaggedItem',- 'Subscription',- 'PersonalAPIKey',- 'ProjectSecretAPIKey',- 'OAuthApplication',- 'User',- 'Action',- 'AlertConfiguration',- 'Threshold',- 'AlertSubscription',- 'ExternalDataSource',- 'ExternalDataSchema',- 'Evaluation',- 'LLMTrace',- 'AIGatewayCredit',- 'WebAnalyticsFilterPreset',- 'CustomerProfileConfig',- 'Log',- 'LogsAlertConfiguration',- 'LogsExclusionRule',- 'DashboardWidget',- 'ProductTour',- 'Ticket',- 'InstanceSetting',- 'SignalReport',- 'SignalScoutConfig',- ])- .describe(- '* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `ExportedAsset` - ExportedAsset\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `OAuthApplication` - OAuthApplication\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `AIGatewayCredit` - AIGatewayCredit\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting\n* `SignalReport` - SignalReport\n* `SignalScoutConfig` - SignalScoutConfig'- )- )- .optional()- .describe(- 'Filter by multiple activity scopes, comma-separated. Values must be valid ActivityScope enum values. E.g. "FeatureFlag,Insight".'- ),- user: zod.string().optional().describe('Filter by user UUID who performed the action.'),-})-export const AdvancedActivityLogsListParams = /* @__PURE__ */ zod.object({project_id: zod.string()diff --git a/services/mcp/src/tools/generated/platform_features.ts b/services/mcp/src/tools/generated/platform_features.tsindex c24b9ce8e1db..3d6eb1dc3c23 100644--- a/services/mcp/src/tools/generated/platform_features.ts+++ b/services/mcp/src/tools/generated/platform_features.ts@@ -3,7 +3,6 @@ import { z } from 'zod'import type { Schemas } from '@/api/generated'import {- ActivityLogListQueryParams,AdvancedActivityLogsListQueryParams,ApprovalPoliciesListQueryParams,ApprovalPoliciesRetrieveParams,@@ -24,60 +23,9 @@ import {UserHomeSettingsPartialUpdateParams,UserHomeSettingsRetrieveParams,} from '@/generated/platform_features/api'-import { castStringToInt } from '@/tools/cast-helpers'import { withPostHogUrl, pickResponseFields, type WithPostHogUrl } from '@/tools/tool-utils'import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'-const ActivityLogListSchema = ActivityLogListQueryParams.extend({- page_size: z- .preprocess(castStringToInt, ActivityLogListQueryParams.shape['page_size'].default(10).optional())- .optional(),- page: z.preprocess(castStringToInt, ActivityLogListQueryParams.shape['page']).optional(),-})--const activityLogList = (): ToolBase<- typeof ActivityLogListSchema,- WithPostHogUrl<Schemas.PaginatedActivityLogList>-> => ({- name: 'activity-log-list',- schema: ActivityLogListSchema,- handler: async (context: Context, params: z.infer<typeof ActivityLogListSchema>) => {- const projectId = await context.stateManager.getProjectId()- const result = await context.api.request<Schemas.PaginatedActivityLogList>({- method: 'GET',- path: `/api/projects/${encodeURIComponent(String(projectId))}/activity_log/`,- query: {- item_id: params.item_id,- page: params.page,- page_size: params.page_size,- scope: params.scope,- scopes: params.scopes,- user: params.user,- },- })- const filtered = {- ...result,- results: (result.results ?? []).map((item: any) =>- pickResponseFields(item, [- 'id',- 'user.id',- 'user.first_name',- 'user.last_name',- 'user.email',- 'activity',- 'scope',- 'item_id',- 'detail.name',- 'detail.short_id',- 'detail.type',- 'created_at',- ])- ),- } as typeof result- return await withPostHogUrl(context, filtered, '/activity')- },-})-const AdvancedActivityLogsFiltersSchema = z.object({})const advancedActivityLogsFilters = (): ToolBase<@@ -504,7 +452,6 @@ const userHomeSettingsUpdate = (): ToolBase<typeof UserHomeSettingsUpdateSchema,})export const GENERATED_TOOLS: Record<string, () => ToolBase<ZodObjectAny>> = {- 'activity-log-list': activityLogList,'advanced-activity-logs-filters': advancedActivityLogsFilters,'advanced-activity-logs-list': advancedActivityLogsList,'approval-policies-list': approvalPoliciesList,diff --git a/services/mcp/tests/tools/activityLogs.integration.test.ts b/services/mcp/tests/tools/activityLogs.integration.test.tsindex 44a67993c8a2..22103c4e42e4 100644--- a/services/mcp/tests/tools/activityLogs.integration.test.ts+++ b/services/mcp/tests/tools/activityLogs.integration.test.ts@@ -22,8 +22,8 @@ describe('Activity Logs', { concurrent: false }, () => {await setActiveProjectAndOrg(context, TEST_PROJECT_ID!, TEST_ORG_ID!)})- describe('activity-log-list tool', () => {- const listTool = GENERATED_TOOLS['activity-log-list']!()+ describe('advanced-activity-logs-list tool', () => {+ const listTool = GENERATED_TOOLS['advanced-activity-logs-list']!()it('should list activity logs with default parameters', async () => {const result = await listTool.handler(context, {})@@ -71,21 +71,10 @@ describe('Activity Logs', { concurrent: false }, () => {}})- it('should filter by scope', async () => {- const result = await listTool.handler(context, {- scope: 'FeatureFlag',- page: 1,- page_size: 10,- })- const response = parseToolResponse(result)-- expect(Array.isArray(response.results)).toBe(true)- for (const log of response.results) {- expect(log.scope).toBe('FeatureFlag')- }- })-- it('should filter by multiple scopes', async () => {+ // Guards the array-filter fix: the MCP client sends `scopes` as a JSON-encoded+ // array, which the advanced endpoint must parse (JSONTolerantListField) rather+ // than treat as one literal value that matches nothing.+ it('should filter by scopes', async () => {const result = await listTool.handler(context, {scopes: ['FeatureFlag', 'Insight'],page: 1,@@ -99,7 +88,7 @@ describe('Activity Logs', { concurrent: false }, () => {}})- it('should filter by item_id', async () => {+ it('should filter by item_ids', async () => {// First get a log to find a real item_idconst seed = await listTool.handler(context, { page: 1, page_size: 1 })const seedData = parseToolResponse(seed)@@ -114,7 +103,7 @@ describe('Activity Logs', { concurrent: false }, () => {}const result = await listTool.handler(context, {- item_id: targetItemId,+ item_ids: [targetItemId],page: 1,page_size: 10,})@@ -126,11 +115,10 @@ describe('Activity Logs', { concurrent: false }, () => {}})- it('should return empty results for non-existent scope filter', async () => {- // Use a valid scope but filter by an item_id that doesn't exist+ it('should return empty results for a non-existent item_id filter', async () => {const result = await listTool.handler(context, {- item_id: '999999999',- scope: 'FeatureFlag',+ item_ids: ['999999999'],+ scopes: ['FeatureFlag'],page: 1,page_size: 10,})diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.jsondeleted file mode 100644index 59403e3d6311..000000000000--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.json+++ /dev/null@@ -1,175 +0,0 @@-{- "$schema": "https://json-schema.org/draft/2020-12/schema",- "properties": {- "item_id": {- "description": "Filter by the ID of the affected resource.",- "minLength": 1,- "type": "string"- },- "page": {- "description": "Page number for pagination. When provided, uses page-based pagination ordered by most recent first.",- "minimum": 1,- "type": "number"- },- "page_size": {- "default": 10,- "description": "Number of results per page (default: 100, max: 1000). Only used with page-based pagination.",- "maximum": 1000,- "minimum": 1,- "type": "number"- },- "scope": {- "description": "Filter by a single activity scope, e.g. \"FeatureFlag\", \"Insight\", \"Dashboard\", \"Experiment\".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `ExportedAsset` - ExportedAsset\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `OAuthApplication` - OAuthApplication\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `AIGatewayCredit` - AIGatewayCredit\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting\n* `SignalReport` - SignalReport\n* `SignalScoutConfig` - SignalScoutConfig",- "enum": [- "Cohort",- "FeatureFlag",- "Person",- "Group",- "Insight",- "Plugin",- "PluginConfig",- "HogFunction",- "HogFlow",- "DataManagement",- "EventDefinition",- "PropertyDefinition",- "Notebook",- "Endpoint",- "EndpointVersion",- "Dashboard",- "Replay",- "Experiment",- "ExperimentHoldout",- "ExperimentSavedMetric",- "Survey",- "EarlyAccessFeature",- "SessionRecordingPlaylist",- "Comment",- "Team",- "Project",- "ErrorTrackingIssue",- "DataWarehouseSavedQuery",- "LegalDocument",- "Organization",- "OrganizationDomain",- "OrganizationMembership",- "Role",- "UserGroup",- "BatchExport",- "BatchImport",- "ExportedAsset",- "Integration",- "Annotation",- "Tag",- "TaggedItem",- "Subscription",- "PersonalAPIKey",- "ProjectSecretAPIKey",- "OAuthApplication",- "User",- "Action",- "AlertConfiguration",- "Threshold",- "AlertSubscription",- "ExternalDataSource",- "ExternalDataSchema",- "Evaluation",- "LLMTrace",- "AIGatewayCredit",- "WebAnalyticsFilterPreset",- "CustomerProfileConfig",- "Log",- "LogsAlertConfiguration",- "LogsExclusionRule",- "DashboardWidget",- "ProductTour",- "Ticket",- "InstanceSetting",- "SignalReport",- "SignalScoutConfig"- ],- "type": "string"- },- "scopes": {- "description": "Filter by multiple activity scopes, comma-separated. Values must be valid ActivityScope enum values. E.g. \"FeatureFlag,Insight\".",- "items": {- "description": "* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `ExportedAsset` - ExportedAsset\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `OAuthApplication` - OAuthApplication\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `AIGatewayCredit` - AIGatewayCredit\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting\n* `SignalReport` - SignalReport\n* `SignalScoutConfig` - SignalScoutConfig",- "enum": [- "Cohort",- "FeatureFlag",- "Person",- "Group",- "Insight",- "Plugin",- "PluginConfig",- "HogFunction",- "HogFlow",- "DataManagement",- "EventDefinition",- "PropertyDefinition",- "Notebook",- "Endpoint",- "EndpointVersion",- "Dashboard",- "Replay",- "Experiment",- "ExperimentHoldout",- "ExperimentSavedMetric",- "Survey",- "EarlyAccessFeature",- "SessionRecordingPlaylist",- "Comment",- "Team",- "Project",- "ErrorTrackingIssue",- "DataWarehouseSavedQuery",- "LegalDocument",- "Organization",- "OrganizationDomain",- "OrganizationMembership",- "Role",- "UserGroup",- "BatchExport",- "BatchImport",- "ExportedAsset",- "Integration",- "Annotation",- "Tag",- "TaggedItem",- "Subscription",- "PersonalAPIKey",- "ProjectSecretAPIKey",- "OAuthApplication",- "User",- "Action",- "AlertConfiguration",- "Threshold",- "AlertSubscription",- "ExternalDataSource",- "ExternalDataSchema",- "Evaluation",- "LLMTrace",- "AIGatewayCredit",- "WebAnalyticsFilterPreset",- "CustomerProfileConfig",- "Log",- "LogsAlertConfiguration",- "LogsExclusionRule",- "DashboardWidget",- "ProductTour",- "Ticket",- "InstanceSetting",- "SignalReport",- "SignalScoutConfig"- ],- "type": "string"- },- "type": "array"- },- "user": {- "description": "Filter by user UUID who performed the action.",- "type": "string"- }- },- "type": "object"-}