:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(replay): point the recording tools at the AI summary endpoint (#103629)
posthog[bot]86dbb09a817e
diff --git a/products/replay/mcp/prompts/query-session-recordings-list.md b/products/replay/mcp/prompts/query-session-recordings-list.mdindex f36c8512b736..774bf9d74cc6 100644--- a/products/replay/mcp/prompts/query-session-recordings-list.md+++ b/products/replay/mcp/prompts/query-session-recordings-list.md@@ -153,4 +153,5 @@ When you have known `$session_id` values (e.g., from `$exception` events or othe- Default time range is last 3 days. Adjust based on the user's needs.- Deep-link to a specific recording as `{posthog_base_url}/replay/{id}`, never `/replay/home?sessionRecordingId={id}`.- For detailed analysis of a single recording, use `session-recording-get` with the recording's `id`.+- For an AI summary of what happened in a recording, read `vision-observations-list` for an existing one, or generate one with `vision-scanners-inline-scan-create` using `scanner_type: "summarizer"` and a `prompt` (the investigating-replay skill carries the exact config the Summarize button uses).- **If no recordings are found** or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from recent events (no `$session_id` filter needed for project-wide issues). Common causes: sampling excluded sessions, recording disabled in project settings, ad blocker blocked the recorder script, or SDK misconfigured.diff --git a/products/replay/mcp/tools.yaml b/products/replay/mcp/tools.yamlindex b3a73654d31e..163876308dec 100644--- a/products/replay/mcp/tools.yaml+++ b/products/replay/mcp/tools.yaml@@ -62,10 +62,14 @@ tools:Any `$session_id` value from an event can be passed as the `id` parameter to this tool. Note: a`$session_id` on an event does not guarantee a recording exists — session replay may not be enabled for thatproject or session. A 404 means no recording was captured. If the user wants to understand what happened- without watching the recording, check `vision-observations-list` for an existing Replay Vision AI summary,- or run a summarizer scanner via `vision-scanners-scan-session` (see the investigating-replay skill; scanning- is slow). If a recording is missing (404) or the user asks why recordings aren't being captured, diagnose- with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and+ without watching the recording, check `vision-observations-list` for an existing Replay Vision AI summary of+ the session. To generate one, call `vision-scanners-inline-scan-create` with the session id in+ `session_ids`, `scanner_type: "summarizer"`, and a `prompt` (required), then read the summary back with+ `vision-observations-list`. The investigating-replay skill carries the exact prompt and `scanner_config` the+ Summarize button in the player uses, so pass those to land on the same summary (scanning is slow).+ `vision-scanners-scan-session` points a saved scanner at the session instead. If a recording is missing+ (404) or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query+ `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and`$sdk_debug_recording_script_not_loaded` from the events table (filter by `$session_id` for a specificsession, or sample recent events for project-wide issues).ui_app: session-recordingdiff --git a/products/replay/skills/investigating-replay/SKILL.md b/products/replay/skills/investigating-replay/SKILL.mdindex 6879842ba300..25eef12d9e68 100644--- a/products/replay/skills/investigating-replay/SKILL.md+++ b/products/replay/skills/investigating-replay/SKILL.md@@ -18,17 +18,17 @@ ask for each piece.## Available tools-| Tool | Purpose |-| ------------------------------------------ | -------------------------------------------------------- |-| `posthog:session-recording-get` | Recording metadata (duration, counts, status) |-| `posthog:persons-retrieve` | Person profile (properties, distinct IDs) |-| `posthog:execute-sql` | Query events, errors, and page views in session |-| `posthog:query-error-tracking-issues-list` | Find error tracking issues linked to the session |-| `posthog:vision-observations-list` | Check for an existing Replay Vision AI summary |-| `posthog:vision-scanners-list` | Find summarizer scanners (`scanner_type=summarizer`) |-| `posthog:vision-scanners-scan-session` | Run a summarizer scanner on the session (slow, optional) |-| `posthog:vision-scanners-create` | Create a temporary summarizer scanner (ask first) |-| `posthog:vision-scanners-delete` | Delete a temporary scanner after summarizing |+| Tool | Purpose |+| -------------------------------------------- | ---------------------------------------------------------- |+| `posthog:session-recording-get` | Recording metadata (duration, counts, status) |+| `posthog:persons-retrieve` | Person profile (properties, distinct IDs) |+| `posthog:execute-sql` | Query events, errors, and page views in session |+| `posthog:query-error-tracking-issues-list` | Find error tracking issues linked to the session |+| `posthog:vision-observations-list` | Check for an existing Replay Vision AI summary |+| `posthog:vision-observations-retrieve` | Read one observation in full (`scanner_result`) |+| `posthog:vision-scanners-inline-scan-create` | Generate an AI summary of the session (slow, optional) |+| `posthog:vision-scanners-list` | Find saved summarizer scanners (`scanner_type=summarizer`) |+| `posthog:vision-scanners-scan-session` | Run a saved summarizer scanner on the session (slow) |## Workflow@@ -176,83 +176,65 @@ a scanner can only observe a given session once.}```- Look for an observation where `scanner_snapshot.scanner_type` is `summarizer`- and `status` is `succeeded`. If found, read `scanner_result.model_output`- (`title`, `summary`, `intent`, `outcome`, `friction_points`, `keywords`) — done,- no new scan needed.+ The rows come back narrowed to `id`, `session_id`, `status`, `summary_line` and+ `scanner_id`. Look for one whose `status` is `succeeded`, then read it in full with+ `vision-observations-retrieve` for that `id`: its `scanner_snapshot.scanner_type`+ tells you whether it is a `summarizer`, and `scanner_result.model_output` carries+ `title`, `summary`, `intent`, `outcome`, `friction_points` and `keywords`. If you+ find one, you are done — no new scan needed.-2. **Find a summarizer scanner** if none exists yet:+2. **Generate one** with an inline scan. Pass this exact config: inline scans are+ keyed by a fingerprint of the whole config, so the config below reuses the same+ scanner row the player's Summarize button uses on its built-in prompt, while a+ different prompt or `length` mints a separate scanner and a separate summary.```json- posthog:vision-scanners-list+ posthog:vision-scanners-inline-scan-create{- "scanner_type": "summarizer"- }- ```-- - Exactly one → use it.- - More than one → show the user the scanners (name + prompt) and ask which to use.- - None → no summarizer scanner exists. See- **No summarizer scanner? Run a temporary one** below.--3. **Scan the session** with the chosen scanner. Warn this is async and takes- several minutes (rasterize + LLM):-- ```json- posthog:vision-scanners-scan-session- {- "id": "<scanner_id>",- "session_id": "<session_id>"+ "session_ids": ["<session_id>"],+ "scanner_type": "summarizer",+ "prompt": "Summarize what the user did in this session: which pages they visited, what they tried to accomplish, and any notable moments like errors, confusion, or successful completions. Be concrete and don't speculate.",+ "scanner_config": { "length": "medium" }}```-4. **Retrieve the result** by polling `vision-observations-list` (step 1) until- the new observation reaches `succeeded`.--### No summarizer scanner? Run a temporary one+ Leave `model` out so the server default applies. Warn the user this is async and+ takes several minutes (rasterize + LLM). Nothing is scheduled and there is+ nothing to clean up: the scanner an inline scan mints never sweeps on its own. A+ 400 here usually means the organization has not approved AI data processing yet.-If the project has no summarizer scanner, you can still produce a one-off summary-with a throwaway scanner — but **ask the user's permission before creating anything**.+3. **Read `results[0].scan_outcome` before polling.** `started` means poll+ `vision-observations-list` (step 1) until the new observation reaches `succeeded`.+ `already_scanned` means a terminal observation already exists — read it via step 1,+ and if its status is `failed` or `ineligible` say so rather than polling. A null+ `scan_id` or `skipped_quota` means nothing ran: report the quota, do not poll.-1. **Ask permission** to create a temporary summarizer scanner just to summarize- this one session.+### The project already has a summarizer scanner-2. **Create it disabled** so it never sweeps on a schedule — a disabled scanner- only runs when you trigger it on demand, so it won't touch other sessions or- burn quota in the background:+Use an inline scan for a one-off summary even then. Only reach for a saved scanner+when the user wants that scanner's own prompt rather than the built-in one:- ```json- posthog:vision-scanners-create- {- "name": "Temporary on-demand summary",- "scanner_type": "summarizer",- "scanner_config": {- "prompt": "Summarize what the user was trying to do, whether they succeeded, and any friction they hit."- },- "query": { "kind": "RecordingsQuery" },- "model": "gemini-3-flash-preview",- "enabled": false- }- ```--3. **Scan this session on demand** with the new scanner, then poll for the result:+```json+posthog:vision-scanners-list+{+ "scanner_type": "summarizer"+}+```- ```json- posthog:vision-scanners-scan-session- {- "id": "<new_scanner_id>",- "session_id": "<session_id>"- }- ```+Show the user the scanners (name + prompt), ask which to use, then run it against+the session and poll `vision-observations-list` until the observation reaches+`succeeded`:- Poll `vision-observations-list` until the observation reaches `succeeded` and- read `scanner_result.model_output`.+```json+posthog:vision-scanners-scan-session+{+ "id": "<scanner_id>",+ "session_id": "<session_id>"+}+```-4. **Ask whether to keep or delete the scanner.** Once you have the observation,- ask the user if they want to keep the temporary scanner or delete it with- `vision-scanners-delete`. Deleting is safe: the summary you just read is also- emitted as an event that persists after the scanner is gone, so cleaning up the- temporary scanner does not lose the result.+Never create a scanner to answer a single question — `vision-scanners-create`+leaves a scheduled sweep behind that the inline scan does not.## Tipsdiff --git a/products/replay_vision/backend/api/scanners.py b/products/replay_vision/backend/api/scanners.pyindex 47bd2615a5cf..5525ccb5da0e 100644--- a/products/replay_vision/backend/api/scanners.py+++ b/products/replay_vision/backend/api/scanners.py@@ -1241,7 +1241,12 @@ class InlineScanRequestSerializer(serializers.Serializer):choices=ScannerType.choices,required=False,default=ScannerType.MONITOR,- help_text="What the scan produces. Defaults to monitor, an open-ended observation against the prompt.",+ help_text=(+ "What the scan produces. Defaults to monitor, an open-ended observation against the prompt. "+ "Use `summarizer` to get PostHog's own AI summary of a recording. An inline scan is keyed by "+ "its whole config, so the Summarize button in the replay player shares this scan only when "+ "the prompt and `scanner_config` match the ones it sends."+ ),)scanner_config = serializers.JSONField(required=False,@@ -2409,6 +2414,10 @@ class ReplayScannerViewSet(TeamAndOrgViewSetMixin, AccessControlViewSetMixin, viThe config resolves to a scanner minted on first use, so asking the same question twice reusesthe observations it already has, while a different question about the same session gets its own.++ With `scanner_type` set to `summarizer`, this is how you get PostHog's own AI summary for a+ recording ID. It resolves to the Summarize button's own scanner only when the prompt and+ `scanner_config` match what the button sends, since the config is what the key fingerprints."""# This action is `detail=False`, so the generic gate settles for editor access to any one# scanner and there is no object afterwards to narrow that against. An inline scan mints adiff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.tsindex 91f4979f8538..1c3a1a5f98ec 100644--- a/products/replay_vision/frontend/generated/api.schemas.ts+++ b/products/replay_vision/frontend/generated/api.schemas.ts@@ -2256,7 +2256,7 @@ export interface InlineScanRequestApi {* @maxLength 20000*/prompt: string- /** What the scan produces. Defaults to monitor, an open-ended observation against the prompt.+ /** What the scan produces. Defaults to monitor, an open-ended observation against the prompt. Use `summarizer` to get PostHog's own AI summary of a recording. An inline scan is keyed by its whole config, so the Summarize button in the replay player shares this scan only when the prompt and `scanner_config` match the ones it sends.** * `monitor` - Monitor* * `classifier` - Classifierdiff --git a/products/replay_vision/frontend/generated/api.ts b/products/replay_vision/frontend/generated/api.tsindex 54e9d8478f3e..069a34c539a3 100644--- a/products/replay_vision/frontend/generated/api.ts+++ b/products/replay_vision/frontend/generated/api.ts@@ -1562,6 +1562,10 @@ export const getVisionScannersInlineScanCreateUrl = (projectId: string) => {** The config resolves to a scanner minted on first use, so asking the same question twice reuses* the observations it already has, while a different question about the same session gets its own.+ *+ * With `scanner_type` set to `summarizer`, this is how you get PostHog's own AI summary for a+ * recording ID. It resolves to the Summarize button's own scanner only when the prompt and+ * `scanner_config` match what the button sends, since the config is what the key fingerprints.*/export const visionScannersInlineScanCreate = async (projectId: string,diff --git a/products/replay_vision/frontend/generated/api.zod.ts b/products/replay_vision/frontend/generated/api.zod.tsindex 41e18c68d75b..6d47cfaffe2a 100644--- a/products/replay_vision/frontend/generated/api.zod.ts+++ b/products/replay_vision/frontend/generated/api.zod.ts@@ -1266,6 +1266,10 @@ export const VisionScannersEstimateCreateBody = /* @__PURE__ */ zod** The config resolves to a scanner minted on first use, so asking the same question twice reuses* the observations it already has, while a different question about the same session gets its own.+ *+ * With `scanner_type` set to `summarizer`, this is how you get PostHog's own AI summary for a+ * recording ID. It resolves to the Summarize button's own scanner only when the prompt and+ * `scanner_config` match what the button sends, since the config is what the key fingerprints.*/export const visionScannersInlineScanCreateBodySessionIdsItemMax = 128@@ -1297,7 +1301,7 @@ export const VisionScannersInlineScanCreateBody = /* @__PURE__ */ zod).default(visionScannersInlineScanCreateBodyScannerTypeDefault).describe(- 'What the scan produces. Defaults to monitor, an open-ended observation against the prompt.\n\n\* `monitor` - Monitor\n\* `classifier` - Classifier\n\* `scorer` - Scorer\n\* `summarizer` - Summarizer'+ "What the scan produces. Defaults to monitor, an open-ended observation against the prompt. Use `summarizer` to get PostHog's own AI summary of a recording. An inline scan is keyed by its whole config, so the Summarize button in the replay player shares this scan only when the prompt and `scanner_config` match the ones it sends.\n\n\* `monitor` - Monitor\n\* `classifier` - Classifier\n\* `scorer` - Scorer\n\* `summarizer` - Summarizer"),scanner_config: zod.unknown()diff --git a/products/replay_vision/mcp/tools.yaml b/products/replay_vision/mcp/tools.yamlindex 3fbc2fd3a81b..d7c77b2788b3 100644--- a/products/replay_vision/mcp/tools.yaml+++ b/products/replay_vision/mcp/tools.yaml@@ -403,16 +403,21 @@ tools:title: Scan sessions against a promptdescription: >Answer a one-off question about session recordings you already have in hand, without creating a scanner- first. Pass the `session_ids` and a `prompt`; nothing is saved and nothing runs on a schedule. Prefer this- over `vision-scanners-create` whenever you have specific sessions and a question about them — a scanner is- for a standing watch over future recordings, and creating one to answer a single question leaves a scheduled- sweep behind. `scanner_type` defaults to `monitor` (open-ended); pass `classifier`, `scorer`, or- `summarizer` with the matching `scanner_config` (`tags`, `scale`, optional `length`) when you want- structured output. Results are not returned inline: the response gives a `scan_id`, and you read the- observations from `vision-observations-list` with that scanner id, polling until each session's observation- leaves `pending`/`running`. Asking the same question again returns the same `scan_id` and reuses the answers- it already has, so re-asking is cheap and sessions already scanned come back as `already_scanned` rather- than being charged twice. Scans cost credits per session at the same rate a scanner does; check+ first. Pass the `session_ids` and a `prompt`; no scheduled scanner is created, though the observations it+ produces persist and are reused on a repeat call. Prefer this over `vision-scanners-create` whenever you+ have specific sessions and a question about them — a scanner is for a standing watch over future recordings,+ and creating one to answer a single question leaves a scheduled sweep behind. `scanner_type` defaults to+ `monitor` (open-ended); pass `classifier`, `scorer`, or `summarizer` with the matching `scanner_config`+ (`tags`, `scale`, optional `length`) when you want structured output. `summarizer` produces PostHog's own AI+ summary of a recording, the same one the Summarize button in the replay player runs when you pass its prompt+ and `scanner_config` (the investigating-replay skill carries them), so use it for "summarize this recording"+ and "what happened in this session". Results are not returned inline: the response gives a `scan_id`, which+ is a scanner id, and you read the observations from `vision-scanners-observations-list` with `scanner_id`+ set to it, polling until each session's observation leaves `pending`/`running`. `vision-observations-list`+ works too when you want one session's observations across every scanner, since it takes a `session_id`+ rather than a scanner. Asking the same question again returns the same `scan_id` and reuses the answers it+ already has, so re-asking is cheap and sessions already scanned come back as `already_scanned` rather than+ being charged twice. Scans cost credits per session at the same rate a scanner does; check`vision-quota-retrieve` first if the batch is large, since sessions past the monthly limit come back as`skipped_quota` instead of failing the call.ui_app: inline-scandiff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex a3bc3f6ad7df..0339809b89c8 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -9462,7 +9462,7 @@"system_prompt_hint": "List persons in a retention acquisition cohort and which intervals they returned in"},"query-session-recordings-list": {- "description": "List session recordings in the project. Returns recording metadata including duration, activity counts, console errors, start URL, and interaction metrics. Use this tool to find, filter, and explore session recordings.\n\nUse 'read-data-schema' to discover available person, session, and event properties for filtering.\n\nExamples of use cases include:\n\n- Find recordings with console errors in the last week\n- Show me recordings from users in a specific country\n- List the longest recordings from today\n- Find recordings where users visited a specific page\n- Show recordings with high activity scores\n- Find recordings for a specific person\n\nCRITICAL: Be minimalist. Only include filters and settings essential to answer the user's question. Default settings are usually sufficient.\n\n# Property filters\n\nUse property filters to narrow results. Only include filters directly relevant to the user's question.\n\nWhen using a property filter, you should:\n\n- **Prioritize properties directly related to the user's query.**\n- **Ensure the correct filter type.** Types: `person`, `session`, `event`, `recording`, `cohort`.\n- **Use `read-data-schema` to discover property names and values** before creating filters.\n\n## Common properties\n\n**Recording** (type: `recording`): `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `activity_score`. These are built-in metrics, not events.\n\n**Session** (type: `session`): `$session_duration`, `$channel_type`, `$entry_current_url`, `$entry_pathname`, `$is_bounce`, `$pageview_count`.\n\n**Person** (type: `person`): `$geoip_country_code`, `$geoip_city_name`, `email`, and custom person properties.\n\n**Event** (type: `event`): `$current_url`, `$pathname`, `$browser`, `$os`, `$device_type`, `$screen_width`.\n\n**Cohort** (type: `cohort`): scope recordings to persons belonging to a cohort. `key` is always `\"id\"`, `value` is the cohort ID, operator is `in` (or `not_in` to exclude). Example: `{ \"type\": \"cohort\", \"key\": \"id\", \"value\": 42, \"operator\": \"in\" }`. Use `cohorts-list` to find cohort IDs.\n\n## Operators\n\n**String**: `exact`, `is_not`, `icontains`, `not_icontains`, `regex`, `not_regex`, `is_set`, `is_not_set`\n**Numeric**: `exact`, `is_not`, `gt`, `gte`, `lt`, `lte`, `is_set`, `is_not_set`\n**DateTime**: `is_date_exact`, `is_date_before`, `is_date_after`, `is_set`, `is_not_set`\n**Boolean**: `exact`, `is_not`, `is_set`, `is_not_set`\n\n`exact` and `is_not` accept arrays of values. Use `icontains` for URLs, `exact` for enumerated values, `gt`/`lt` for counts.\n\n# Ordering\n\nSort recordings by: `start_time` (default), `duration`, `activity_score`, `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `active_seconds`, `inactive_seconds`.\n\nDefault direction is `DESC` (newest/highest first).\n\n# Date range\n\n- `date_from`: Relative (`-7d`, `-24h`) or absolute (`2025-01-15`). Default: `-3d`.\n- `date_to`: Relative or absolute. Default: now.\n\nDo not use property filters for time-based filtering. Use the `date_from`/`date_to` fields instead.\n\n# Pagination\n\nUse `limit` to control page size and `after` (from the previous response's `next_cursor`) for cursor-based pagination.\n\n# Response shape\n\nEach recording in results contains:\n\n- `id` — session recording ID\n- `distinct_id` — the person's distinct ID\n- `start_time` / `end_time` — recording time range (ISO 8601)\n- `recording_duration` — length in seconds\n- `active_seconds` / `inactive_seconds` — activity breakdown\n- `click_count`, `keypress_count`, `mouse_activity_count` — interaction counts\n- `console_log_count`, `console_warn_count`, `console_error_count` — console output counts\n- `start_url` — first page URL visited\n- `activity_score` — engagement score (higher = more active)\n- `ongoing` — whether the session is still active\n\n# Deep links to specific recordings\n\nTo link a user to a specific recording, build the URL as `{posthog_base_url}/replay/{id}` using the `id` returned in each result row.\n\nDo not use `/replay/home?sessionRecordingId={id}` — that path takes the user to the replay list with the default filter applied and does not open the recording.\n\n# Examples\n\n## Recent recordings with console errors\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"console_error_count\", \"operator\": \"gt\", \"type\": \"recording\", \"value\": 0 }],\n \"order\": \"console_error_count\"\n}\n```\n\n## Longest recordings today\n\n```json\n{\n \"date_from\": \"-1d\",\n \"filter_test_accounts\": true,\n \"order\": \"duration\",\n \"limit\": 10\n}\n```\n\n## Recordings for a specific person\n\n```json\n{\n \"date_from\": \"-30d\",\n \"person_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"filter_test_accounts\": true\n}\n```\n\n## Recordings from mobile users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"$device_type\", \"operator\": \"exact\", \"type\": \"event\", \"value\": [\"Mobile\"] }]\n}\n```\n\n## Recordings from a cohort of users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"id\", \"operator\": \"in\", \"type\": \"cohort\", \"value\": 42 }]\n}\n```\n\n## Fetch specific recordings by session ID\n\nWhen you have known `$session_id` values (e.g., from `$exception` events or other event data), use the `session_ids` parameter to fetch those recordings directly:\n\n```json\n{\n \"session_ids\": [\"session-id-1\", \"session-id-2\", \"session-id-3\"]\n}\n```\n\n# Reminders\n\n- Use `filter_test_accounts: true` by default to exclude internal users.\n- Only include property filters directly relevant to the user's question.\n- Default time range is last 3 days. Adjust based on the user's needs.\n- Deep-link to a specific recording as `{posthog_base_url}/replay/{id}`, never `/replay/home?sessionRecordingId={id}`.\n- For detailed analysis of a single recording, use `session-recording-get` with the recording's `id`.\n- **If no recordings are found** or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from recent events (no `$session_id` filter needed for project-wide issues). Common causes: sampling excluded sessions, recording disabled in project settings, ad blocker blocked the recorder script, or SDK misconfigured.",+ "description": "List session recordings in the project. Returns recording metadata including duration, activity counts, console errors, start URL, and interaction metrics. Use this tool to find, filter, and explore session recordings.\n\nUse 'read-data-schema' to discover available person, session, and event properties for filtering.\n\nExamples of use cases include:\n\n- Find recordings with console errors in the last week\n- Show me recordings from users in a specific country\n- List the longest recordings from today\n- Find recordings where users visited a specific page\n- Show recordings with high activity scores\n- Find recordings for a specific person\n\nCRITICAL: Be minimalist. Only include filters and settings essential to answer the user's question. Default settings are usually sufficient.\n\n# Property filters\n\nUse property filters to narrow results. Only include filters directly relevant to the user's question.\n\nWhen using a property filter, you should:\n\n- **Prioritize properties directly related to the user's query.**\n- **Ensure the correct filter type.** Types: `person`, `session`, `event`, `recording`, `cohort`.\n- **Use `read-data-schema` to discover property names and values** before creating filters.\n\n## Common properties\n\n**Recording** (type: `recording`): `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `activity_score`. These are built-in metrics, not events.\n\n**Session** (type: `session`): `$session_duration`, `$channel_type`, `$entry_current_url`, `$entry_pathname`, `$is_bounce`, `$pageview_count`.\n\n**Person** (type: `person`): `$geoip_country_code`, `$geoip_city_name`, `email`, and custom person properties.\n\n**Event** (type: `event`): `$current_url`, `$pathname`, `$browser`, `$os`, `$device_type`, `$screen_width`.\n\n**Cohort** (type: `cohort`): scope recordings to persons belonging to a cohort. `key` is always `\"id\"`, `value` is the cohort ID, operator is `in` (or `not_in` to exclude). Example: `{ \"type\": \"cohort\", \"key\": \"id\", \"value\": 42, \"operator\": \"in\" }`. Use `cohorts-list` to find cohort IDs.\n\n## Operators\n\n**String**: `exact`, `is_not`, `icontains`, `not_icontains`, `regex`, `not_regex`, `is_set`, `is_not_set`\n**Numeric**: `exact`, `is_not`, `gt`, `gte`, `lt`, `lte`, `is_set`, `is_not_set`\n**DateTime**: `is_date_exact`, `is_date_before`, `is_date_after`, `is_set`, `is_not_set`\n**Boolean**: `exact`, `is_not`, `is_set`, `is_not_set`\n\n`exact` and `is_not` accept arrays of values. Use `icontains` for URLs, `exact` for enumerated values, `gt`/`lt` for counts.\n\n# Ordering\n\nSort recordings by: `start_time` (default), `duration`, `activity_score`, `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `active_seconds`, `inactive_seconds`.\n\nDefault direction is `DESC` (newest/highest first).\n\n# Date range\n\n- `date_from`: Relative (`-7d`, `-24h`) or absolute (`2025-01-15`). Default: `-3d`.\n- `date_to`: Relative or absolute. Default: now.\n\nDo not use property filters for time-based filtering. Use the `date_from`/`date_to` fields instead.\n\n# Pagination\n\nUse `limit` to control page size and `after` (from the previous response's `next_cursor`) for cursor-based pagination.\n\n# Response shape\n\nEach recording in results contains:\n\n- `id` — session recording ID\n- `distinct_id` — the person's distinct ID\n- `start_time` / `end_time` — recording time range (ISO 8601)\n- `recording_duration` — length in seconds\n- `active_seconds` / `inactive_seconds` — activity breakdown\n- `click_count`, `keypress_count`, `mouse_activity_count` — interaction counts\n- `console_log_count`, `console_warn_count`, `console_error_count` — console output counts\n- `start_url` — first page URL visited\n- `activity_score` — engagement score (higher = more active)\n- `ongoing` — whether the session is still active\n\n# Deep links to specific recordings\n\nTo link a user to a specific recording, build the URL as `{posthog_base_url}/replay/{id}` using the `id` returned in each result row.\n\nDo not use `/replay/home?sessionRecordingId={id}` — that path takes the user to the replay list with the default filter applied and does not open the recording.\n\n# Examples\n\n## Recent recordings with console errors\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"console_error_count\", \"operator\": \"gt\", \"type\": \"recording\", \"value\": 0 }],\n \"order\": \"console_error_count\"\n}\n```\n\n## Longest recordings today\n\n```json\n{\n \"date_from\": \"-1d\",\n \"filter_test_accounts\": true,\n \"order\": \"duration\",\n \"limit\": 10\n}\n```\n\n## Recordings for a specific person\n\n```json\n{\n \"date_from\": \"-30d\",\n \"person_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"filter_test_accounts\": true\n}\n```\n\n## Recordings from mobile users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"$device_type\", \"operator\": \"exact\", \"type\": \"event\", \"value\": [\"Mobile\"] }]\n}\n```\n\n## Recordings from a cohort of users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"id\", \"operator\": \"in\", \"type\": \"cohort\", \"value\": 42 }]\n}\n```\n\n## Fetch specific recordings by session ID\n\nWhen you have known `$session_id` values (e.g., from `$exception` events or other event data), use the `session_ids` parameter to fetch those recordings directly:\n\n```json\n{\n \"session_ids\": [\"session-id-1\", \"session-id-2\", \"session-id-3\"]\n}\n```\n\n# Reminders\n\n- Use `filter_test_accounts: true` by default to exclude internal users.\n- Only include property filters directly relevant to the user's question.\n- Default time range is last 3 days. Adjust based on the user's needs.\n- Deep-link to a specific recording as `{posthog_base_url}/replay/{id}`, never `/replay/home?sessionRecordingId={id}`.\n- For detailed analysis of a single recording, use `session-recording-get` with the recording's `id`.\n- For an AI summary of what happened in a recording, read `vision-observations-list` for an existing one, or generate one with `vision-scanners-inline-scan-create` using `scanner_type: \"summarizer\"` and a `prompt` (the investigating-replay skill carries the exact config the Summarize button uses).\n- **If no recordings are found** or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from recent events (no `$session_id` filter needed for project-wide issues). Common causes: sampling excluded sessions, recording disabled in project settings, ad blocker blocked the recorder script, or SDK misconfigured.","category": "Session replays","feature": "replay","summary": "List session recordings",@@ -10329,7 +10329,7 @@}},"session-recording-get": {- "description": "Get a specific session recording by ID. Returns full recording metadata including duration, interaction counts, console log counts, viewing status, and a compact person summary (id, name, distinct IDs). The person's full property bag is not included — use `persons-retrieve` when you need a person's properties. Session recordings are reachable from events, errors, and persons via the `$session_id` property on events. Any `$session_id` value from an event can be passed as the `id` parameter to this tool. Note: a `$session_id` on an event does not guarantee a recording exists — session replay may not be enabled for that project or session. A 404 means no recording was captured. If the user wants to understand what happened without watching the recording, check `vision-observations-list` for an existing Replay Vision AI summary, or run a summarizer scanner via `vision-scanners-scan-session` (see the investigating-replay skill; scanning is slow). If a recording is missing (404) or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from the events table (filter by `$session_id` for a specific session, or sample recent events for project-wide issues).",+ "description": "Get a specific session recording by ID. Returns full recording metadata including duration, interaction counts, console log counts, viewing status, and a compact person summary (id, name, distinct IDs). The person's full property bag is not included — use `persons-retrieve` when you need a person's properties. Session recordings are reachable from events, errors, and persons via the `$session_id` property on events. Any `$session_id` value from an event can be passed as the `id` parameter to this tool. Note: a `$session_id` on an event does not guarantee a recording exists — session replay may not be enabled for that project or session. A 404 means no recording was captured. If the user wants to understand what happened without watching the recording, check `vision-observations-list` for an existing Replay Vision AI summary of the session. To generate one, call `vision-scanners-inline-scan-create` with the session id in `session_ids`, `scanner_type: \"summarizer\"`, and a `prompt` (required), then read the summary back with `vision-observations-list`. The investigating-replay skill carries the exact prompt and `scanner_config` the Summarize button in the player uses, so pass those to land on the same summary (scanning is slow). `vision-scanners-scan-session` points a saved scanner at the session instead. If a recording is missing (404) or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from the events table (filter by `$session_id` for a specific session, or sample recent events for project-wide issues).","category": "Session replays","feature": "replay","summary": "Get session recording",@@ -12387,7 +12387,7 @@}},"vision-scanners-inline-scan-create": {- "description": "Answer a one-off question about session recordings you already have in hand, without creating a scanner first. Pass the `session_ids` and a `prompt`; nothing is saved and nothing runs on a schedule. Prefer this over `vision-scanners-create` whenever you have specific sessions and a question about them — a scanner is for a standing watch over future recordings, and creating one to answer a single question leaves a scheduled sweep behind. `scanner_type` defaults to `monitor` (open-ended); pass `classifier`, `scorer`, or `summarizer` with the matching `scanner_config` (`tags`, `scale`, optional `length`) when you want structured output. Results are not returned inline: the response gives a `scan_id`, and you read the observations from `vision-observations-list` with that scanner id, polling until each session's observation leaves `pending`/`running`. Asking the same question again returns the same `scan_id` and reuses the answers it already has, so re-asking is cheap and sessions already scanned come back as `already_scanned` rather than being charged twice. Scans cost credits per session at the same rate a scanner does; check `vision-quota-retrieve` first if the batch is large, since sessions past the monthly limit come back as `skipped_quota` instead of failing the call.",+ "description": "Answer a one-off question about session recordings you already have in hand, without creating a scanner first. Pass the `session_ids` and a `prompt`; no scheduled scanner is created, though the observations it produces persist and are reused on a repeat call. Prefer this over `vision-scanners-create` whenever you have specific sessions and a question about them — a scanner is for a standing watch over future recordings, and creating one to answer a single question leaves a scheduled sweep behind. `scanner_type` defaults to `monitor` (open-ended); pass `classifier`, `scorer`, or `summarizer` with the matching `scanner_config` (`tags`, `scale`, optional `length`) when you want structured output. `summarizer` produces PostHog's own AI summary of a recording, the same one the Summarize button in the replay player runs when you pass its prompt and `scanner_config` (the investigating-replay skill carries them), so use it for \"summarize this recording\" and \"what happened in this session\". Results are not returned inline: the response gives a `scan_id`, which is a scanner id, and you read the observations from `vision-scanners-observations-list` with `scanner_id` set to it, polling until each session's observation leaves `pending`/`running`. `vision-observations-list` works too when you want one session's observations across every scanner, since it takes a `session_id` rather than a scanner. Asking the same question again returns the same `scan_id` and reuses the answers it already has, so re-asking is cheap and sessions already scanned come back as `already_scanned` rather than being charged twice. Scans cost credits per session at the same rate a scanner does; check `vision-quota-retrieve` first if the batch is large, since sessions past the monthly limit come back as `skipped_quota` instead of failing the call.","category": "Replay vision","feature": "replay_vision","summary": "Scan sessions against a prompt",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex bb4a93f2bfdc..2edf34b4b601 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -10020,7 +10020,7 @@"system_prompt_hint": "List persons in a retention acquisition cohort and which intervals they returned in"},"query-session-recordings-list": {- "description": "List session recordings in the project. Returns recording metadata including duration, activity counts, console errors, start URL, and interaction metrics. Use this tool to find, filter, and explore session recordings.\n\nUse 'read-data-schema' to discover available person, session, and event properties for filtering.\n\nExamples of use cases include:\n\n- Find recordings with console errors in the last week\n- Show me recordings from users in a specific country\n- List the longest recordings from today\n- Find recordings where users visited a specific page\n- Show recordings with high activity scores\n- Find recordings for a specific person\n\nCRITICAL: Be minimalist. Only include filters and settings essential to answer the user's question. Default settings are usually sufficient.\n\n# Property filters\n\nUse property filters to narrow results. Only include filters directly relevant to the user's question.\n\nWhen using a property filter, you should:\n\n- **Prioritize properties directly related to the user's query.**\n- **Ensure the correct filter type.** Types: `person`, `session`, `event`, `recording`, `cohort`.\n- **Use `read-data-schema` to discover property names and values** before creating filters.\n\n## Common properties\n\n**Recording** (type: `recording`): `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `activity_score`. These are built-in metrics, not events.\n\n**Session** (type: `session`): `$session_duration`, `$channel_type`, `$entry_current_url`, `$entry_pathname`, `$is_bounce`, `$pageview_count`.\n\n**Person** (type: `person`): `$geoip_country_code`, `$geoip_city_name`, `email`, and custom person properties.\n\n**Event** (type: `event`): `$current_url`, `$pathname`, `$browser`, `$os`, `$device_type`, `$screen_width`.\n\n**Cohort** (type: `cohort`): scope recordings to persons belonging to a cohort. `key` is always `\"id\"`, `value` is the cohort ID, operator is `in` (or `not_in` to exclude). Example: `{ \"type\": \"cohort\", \"key\": \"id\", \"value\": 42, \"operator\": \"in\" }`. Use `cohorts-list` to find cohort IDs.\n\n## Operators\n\n**String**: `exact`, `is_not`, `icontains`, `not_icontains`, `regex`, `not_regex`, `is_set`, `is_not_set`\n**Numeric**: `exact`, `is_not`, `gt`, `gte`, `lt`, `lte`, `is_set`, `is_not_set`\n**DateTime**: `is_date_exact`, `is_date_before`, `is_date_after`, `is_set`, `is_not_set`\n**Boolean**: `exact`, `is_not`, `is_set`, `is_not_set`\n\n`exact` and `is_not` accept arrays of values. Use `icontains` for URLs, `exact` for enumerated values, `gt`/`lt` for counts.\n\n# Ordering\n\nSort recordings by: `start_time` (default), `duration`, `activity_score`, `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `active_seconds`, `inactive_seconds`.\n\nDefault direction is `DESC` (newest/highest first).\n\n# Date range\n\n- `date_from`: Relative (`-7d`, `-24h`) or absolute (`2025-01-15`). Default: `-3d`.\n- `date_to`: Relative or absolute. Default: now.\n\nDo not use property filters for time-based filtering. Use the `date_from`/`date_to` fields instead.\n\n# Pagination\n\nUse `limit` to control page size and `after` (from the previous response's `next_cursor`) for cursor-based pagination.\n\n# Response shape\n\nEach recording in results contains:\n\n- `id` — session recording ID\n- `distinct_id` — the person's distinct ID\n- `start_time` / `end_time` — recording time range (ISO 8601)\n- `recording_duration` — length in seconds\n- `active_seconds` / `inactive_seconds` — activity breakdown\n- `click_count`, `keypress_count`, `mouse_activity_count` — interaction counts\n- `console_log_count`, `console_warn_count`, `console_error_count` — console output counts\n- `start_url` — first page URL visited\n- `activity_score` — engagement score (higher = more active)\n- `ongoing` — whether the session is still active\n\n# Deep links to specific recordings\n\nTo link a user to a specific recording, build the URL as `{posthog_base_url}/replay/{id}` using the `id` returned in each result row.\n\nDo not use `/replay/home?sessionRecordingId={id}` — that path takes the user to the replay list with the default filter applied and does not open the recording.\n\n# Examples\n\n## Recent recordings with console errors\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"console_error_count\", \"operator\": \"gt\", \"type\": \"recording\", \"value\": 0 }],\n \"order\": \"console_error_count\"\n}\n```\n\n## Longest recordings today\n\n```json\n{\n \"date_from\": \"-1d\",\n \"filter_test_accounts\": true,\n \"order\": \"duration\",\n \"limit\": 10\n}\n```\n\n## Recordings for a specific person\n\n```json\n{\n \"date_from\": \"-30d\",\n \"person_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"filter_test_accounts\": true\n}\n```\n\n## Recordings from mobile users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"$device_type\", \"operator\": \"exact\", \"type\": \"event\", \"value\": [\"Mobile\"] }]\n}\n```\n\n## Recordings from a cohort of users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"id\", \"operator\": \"in\", \"type\": \"cohort\", \"value\": 42 }]\n}\n```\n\n## Fetch specific recordings by session ID\n\nWhen you have known `$session_id` values (e.g., from `$exception` events or other event data), use the `session_ids` parameter to fetch those recordings directly:\n\n```json\n{\n \"session_ids\": [\"session-id-1\", \"session-id-2\", \"session-id-3\"]\n}\n```\n\n# Reminders\n\n- Use `filter_test_accounts: true` by default to exclude internal users.\n- Only include property filters directly relevant to the user's question.\n- Default time range is last 3 days. Adjust based on the user's needs.\n- Deep-link to a specific recording as `{posthog_base_url}/replay/{id}`, never `/replay/home?sessionRecordingId={id}`.\n- For detailed analysis of a single recording, use `session-recording-get` with the recording's `id`.\n- **If no recordings are found** or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from recent events (no `$session_id` filter needed for project-wide issues). Common causes: sampling excluded sessions, recording disabled in project settings, ad blocker blocked the recorder script, or SDK misconfigured.",+ "description": "List session recordings in the project. Returns recording metadata including duration, activity counts, console errors, start URL, and interaction metrics. Use this tool to find, filter, and explore session recordings.\n\nUse 'read-data-schema' to discover available person, session, and event properties for filtering.\n\nExamples of use cases include:\n\n- Find recordings with console errors in the last week\n- Show me recordings from users in a specific country\n- List the longest recordings from today\n- Find recordings where users visited a specific page\n- Show recordings with high activity scores\n- Find recordings for a specific person\n\nCRITICAL: Be minimalist. Only include filters and settings essential to answer the user's question. Default settings are usually sufficient.\n\n# Property filters\n\nUse property filters to narrow results. Only include filters directly relevant to the user's question.\n\nWhen using a property filter, you should:\n\n- **Prioritize properties directly related to the user's query.**\n- **Ensure the correct filter type.** Types: `person`, `session`, `event`, `recording`, `cohort`.\n- **Use `read-data-schema` to discover property names and values** before creating filters.\n\n## Common properties\n\n**Recording** (type: `recording`): `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `activity_score`. These are built-in metrics, not events.\n\n**Session** (type: `session`): `$session_duration`, `$channel_type`, `$entry_current_url`, `$entry_pathname`, `$is_bounce`, `$pageview_count`.\n\n**Person** (type: `person`): `$geoip_country_code`, `$geoip_city_name`, `email`, and custom person properties.\n\n**Event** (type: `event`): `$current_url`, `$pathname`, `$browser`, `$os`, `$device_type`, `$screen_width`.\n\n**Cohort** (type: `cohort`): scope recordings to persons belonging to a cohort. `key` is always `\"id\"`, `value` is the cohort ID, operator is `in` (or `not_in` to exclude). Example: `{ \"type\": \"cohort\", \"key\": \"id\", \"value\": 42, \"operator\": \"in\" }`. Use `cohorts-list` to find cohort IDs.\n\n## Operators\n\n**String**: `exact`, `is_not`, `icontains`, `not_icontains`, `regex`, `not_regex`, `is_set`, `is_not_set`\n**Numeric**: `exact`, `is_not`, `gt`, `gte`, `lt`, `lte`, `is_set`, `is_not_set`\n**DateTime**: `is_date_exact`, `is_date_before`, `is_date_after`, `is_set`, `is_not_set`\n**Boolean**: `exact`, `is_not`, `is_set`, `is_not_set`\n\n`exact` and `is_not` accept arrays of values. Use `icontains` for URLs, `exact` for enumerated values, `gt`/`lt` for counts.\n\n# Ordering\n\nSort recordings by: `start_time` (default), `duration`, `activity_score`, `console_error_count`, `click_count`, `keypress_count`, `mouse_activity_count`, `active_seconds`, `inactive_seconds`.\n\nDefault direction is `DESC` (newest/highest first).\n\n# Date range\n\n- `date_from`: Relative (`-7d`, `-24h`) or absolute (`2025-01-15`). Default: `-3d`.\n- `date_to`: Relative or absolute. Default: now.\n\nDo not use property filters for time-based filtering. Use the `date_from`/`date_to` fields instead.\n\n# Pagination\n\nUse `limit` to control page size and `after` (from the previous response's `next_cursor`) for cursor-based pagination.\n\n# Response shape\n\nEach recording in results contains:\n\n- `id` — session recording ID\n- `distinct_id` — the person's distinct ID\n- `start_time` / `end_time` — recording time range (ISO 8601)\n- `recording_duration` — length in seconds\n- `active_seconds` / `inactive_seconds` — activity breakdown\n- `click_count`, `keypress_count`, `mouse_activity_count` — interaction counts\n- `console_log_count`, `console_warn_count`, `console_error_count` — console output counts\n- `start_url` — first page URL visited\n- `activity_score` — engagement score (higher = more active)\n- `ongoing` — whether the session is still active\n\n# Deep links to specific recordings\n\nTo link a user to a specific recording, build the URL as `{posthog_base_url}/replay/{id}` using the `id` returned in each result row.\n\nDo not use `/replay/home?sessionRecordingId={id}` — that path takes the user to the replay list with the default filter applied and does not open the recording.\n\n# Examples\n\n## Recent recordings with console errors\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"console_error_count\", \"operator\": \"gt\", \"type\": \"recording\", \"value\": 0 }],\n \"order\": \"console_error_count\"\n}\n```\n\n## Longest recordings today\n\n```json\n{\n \"date_from\": \"-1d\",\n \"filter_test_accounts\": true,\n \"order\": \"duration\",\n \"limit\": 10\n}\n```\n\n## Recordings for a specific person\n\n```json\n{\n \"date_from\": \"-30d\",\n \"person_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"filter_test_accounts\": true\n}\n```\n\n## Recordings from mobile users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"$device_type\", \"operator\": \"exact\", \"type\": \"event\", \"value\": [\"Mobile\"] }]\n}\n```\n\n## Recordings from a cohort of users\n\n```json\n{\n \"date_from\": \"-7d\",\n \"filter_test_accounts\": true,\n \"properties\": [{ \"key\": \"id\", \"operator\": \"in\", \"type\": \"cohort\", \"value\": 42 }]\n}\n```\n\n## Fetch specific recordings by session ID\n\nWhen you have known `$session_id` values (e.g., from `$exception` events or other event data), use the `session_ids` parameter to fetch those recordings directly:\n\n```json\n{\n \"session_ids\": [\"session-id-1\", \"session-id-2\", \"session-id-3\"]\n}\n```\n\n# Reminders\n\n- Use `filter_test_accounts: true` by default to exclude internal users.\n- Only include property filters directly relevant to the user's question.\n- Default time range is last 3 days. Adjust based on the user's needs.\n- Deep-link to a specific recording as `{posthog_base_url}/replay/{id}`, never `/replay/home?sessionRecordingId={id}`.\n- For detailed analysis of a single recording, use `session-recording-get` with the recording's `id`.\n- For an AI summary of what happened in a recording, read `vision-observations-list` for an existing one, or generate one with `vision-scanners-inline-scan-create` using `scanner_type: \"summarizer\"` and a `prompt` (the investigating-replay skill carries the exact config the Summarize button uses).\n- **If no recordings are found** or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from recent events (no `$session_id` filter needed for project-wide issues). Common causes: sampling excluded sessions, recording disabled in project settings, ad blocker blocked the recorder script, or SDK misconfigured.","category": "Session replays","feature": "replay","summary": "List session recordings",@@ -10901,7 +10901,7 @@}},"session-recording-get": {- "description": "Get a specific session recording by ID. Returns full recording metadata including duration, interaction counts, console log counts, viewing status, and a compact person summary (id, name, distinct IDs). The person's full property bag is not included — use `persons-retrieve` when you need a person's properties. Session recordings are reachable from events, errors, and persons via the `$session_id` property on events. Any `$session_id` value from an event can be passed as the `id` parameter to this tool. Note: a `$session_id` on an event does not guarantee a recording exists — session replay may not be enabled for that project or session. A 404 means no recording was captured. If the user wants to understand what happened without watching the recording, check `vision-observations-list` for an existing Replay Vision AI summary, or run a summarizer scanner via `vision-scanners-scan-session` (see the investigating-replay skill; scanning is slow). If a recording is missing (404) or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from the events table (filter by `$session_id` for a specific session, or sample recent events for project-wide issues).",+ "description": "Get a specific session recording by ID. Returns full recording metadata including duration, interaction counts, console log counts, viewing status, and a compact person summary (id, name, distinct IDs). The person's full property bag is not included — use `persons-retrieve` when you need a person's properties. Session recordings are reachable from events, errors, and persons via the `$session_id` property on events. Any `$session_id` value from an event can be passed as the `id` parameter to this tool. Note: a `$session_id` on an event does not guarantee a recording exists — session replay may not be enabled for that project or session. A 404 means no recording was captured. If the user wants to understand what happened without watching the recording, check `vision-observations-list` for an existing Replay Vision AI summary of the session. To generate one, call `vision-scanners-inline-scan-create` with the session id in `session_ids`, `scanner_type: \"summarizer\"`, and a `prompt` (required), then read the summary back with `vision-observations-list`. The investigating-replay skill carries the exact prompt and `scanner_config` the Summarize button in the player uses, so pass those to land on the same summary (scanning is slow). `vision-scanners-scan-session` points a saved scanner at the session instead. If a recording is missing (404) or the user asks why recordings aren't being captured, diagnose with `execute-sql`: query `$recording_status`, `$session_recording_start_reason`, `$replay_sample_rate`, and `$sdk_debug_recording_script_not_loaded` from the events table (filter by `$session_id` for a specific session, or sample recent events for project-wide issues).","category": "Session replays","feature": "replay","summary": "Get session recording",@@ -13032,7 +13032,7 @@}},"vision-scanners-inline-scan-create": {- "description": "Answer a one-off question about session recordings you already have in hand, without creating a scanner first. Pass the `session_ids` and a `prompt`; nothing is saved and nothing runs on a schedule. Prefer this over `vision-scanners-create` whenever you have specific sessions and a question about them — a scanner is for a standing watch over future recordings, and creating one to answer a single question leaves a scheduled sweep behind. `scanner_type` defaults to `monitor` (open-ended); pass `classifier`, `scorer`, or `summarizer` with the matching `scanner_config` (`tags`, `scale`, optional `length`) when you want structured output. Results are not returned inline: the response gives a `scan_id`, and you read the observations from `vision-observations-list` with that scanner id, polling until each session's observation leaves `pending`/`running`. Asking the same question again returns the same `scan_id` and reuses the answers it already has, so re-asking is cheap and sessions already scanned come back as `already_scanned` rather than being charged twice. Scans cost credits per session at the same rate a scanner does; check `vision-quota-retrieve` first if the batch is large, since sessions past the monthly limit come back as `skipped_quota` instead of failing the call.",+ "description": "Answer a one-off question about session recordings you already have in hand, without creating a scanner first. Pass the `session_ids` and a `prompt`; no scheduled scanner is created, though the observations it produces persist and are reused on a repeat call. Prefer this over `vision-scanners-create` whenever you have specific sessions and a question about them — a scanner is for a standing watch over future recordings, and creating one to answer a single question leaves a scheduled sweep behind. `scanner_type` defaults to `monitor` (open-ended); pass `classifier`, `scorer`, or `summarizer` with the matching `scanner_config` (`tags`, `scale`, optional `length`) when you want structured output. `summarizer` produces PostHog's own AI summary of a recording, the same one the Summarize button in the replay player runs when you pass its prompt and `scanner_config` (the investigating-replay skill carries them), so use it for \"summarize this recording\" and \"what happened in this session\". Results are not returned inline: the response gives a `scan_id`, which is a scanner id, and you read the observations from `vision-scanners-observations-list` with `scanner_id` set to it, polling until each session's observation leaves `pending`/`running`. `vision-observations-list` works too when you want one session's observations across every scanner, since it takes a `session_id` rather than a scanner. Asking the same question again returns the same `scan_id` and reuses the answers it already has, so re-asking is cheap and sessions already scanned come back as `already_scanned` rather than being charged twice. Scans cost credits per session at the same rate a scanner does; check `vision-quota-retrieve` first if the batch is large, since sessions past the monthly limit come back as `skipped_quota` instead of failing the call.","category": "Replay vision","feature": "replay_vision","summary": "Scan sessions against a prompt",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 30456ca9738a..cf5b8dafa74e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -51612,7 +51612,7 @@ export namespace Schemas {* @maxLength 20000*/prompt: string;- /** What the scan produces. Defaults to monitor, an open-ended observation against the prompt.+ /** What the scan produces. Defaults to monitor, an open-ended observation against the prompt. Use `summarizer` to get PostHog's own AI summary of a recording. An inline scan is keyed by its whole config, so the Summarize button in the replay player shares this scan only when the prompt and `scanner_config` match the ones it sends.** * `monitor` - Monitor* * `classifier` - Classifierdiff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.tsindex 0762d3810dae..da7d91953c8e 100644--- a/services/mcp/src/generated/replay_vision/api.ts+++ b/services/mcp/src/generated/replay_vision/api.ts@@ -1075,6 +1075,10 @@ export const VisionScannersEstimateCreateBody = () => zod** The config resolves to a scanner minted on first use, so asking the same question twice reuses* the observations it already has, while a different question about the same session gets its own.+ *+ * With `scanner_type` set to `summarizer`, this is how you get PostHog's own AI summary for a+ * recording ID. It resolves to the Summarize button's own scanner only when the prompt and+ * `scanner_config` match what the button sends, since the config is what the key fingerprints.*/export const VisionScannersInlineScanCreateParams = () => zod.object({project_id: zod@@ -1114,7 +1118,7 @@ export const VisionScannersInlineScanCreateBody = () => zod).default(visionScannersInlineScanCreateBodyScannerTypeDefault).describe(- 'What the scan produces. Defaults to monitor, an open-ended observation against the prompt.\n\n\* `monitor` - Monitor\n\* `classifier` - Classifier\n\* `scorer` - Scorer\n\* `summarizer` - Summarizer'+ "What the scan produces. Defaults to monitor, an open-ended observation against the prompt. Use `summarizer` to get PostHog's own AI summary of a recording. An inline scan is keyed by its whole config, so the Summarize button in the replay player shares this scan only when the prompt and `scanner_config` match the ones it sends.\n\n\* `monitor` - Monitor\n\* `classifier` - Classifier\n\* `scorer` - Scorer\n\* `summarizer` - Summarizer"),scanner_config: zod.unknown()diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-inline-scan-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-inline-scan-create.jsonindex 0d9558a4c1e7..eee0c4996fc4 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-inline-scan-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-inline-scan-create.json@@ -18,7 +18,7 @@},"scanner_type": {"default": "monitor",- "description": "What the scan produces. Defaults to monitor, an open-ended observation against the prompt.\n\n* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer",+ "description": "What the scan produces. Defaults to monitor, an open-ended observation against the prompt. Use `summarizer` to get PostHog's own AI summary of a recording. An inline scan is keyed by its whole config, so the Summarize button in the replay player shares this scan only when the prompt and `scanner_config` match the ones it sends.\n\n* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer","enum": ["monitor", "classifier", "scorer", "summarizer"],"type": "string"},