: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(surveys): improve MCP navigation and creation guidance (#97930)
Lucas Faria2adba99feeab
diff --git a/docs/published/docs/surveys/mcp.md b/docs/published/docs/surveys/mcp.mdnew file mode 100644index 000000000000..890fd52bcf3e--- /dev/null+++ b/docs/published/docs/surveys/mcp.md@@ -0,0 +1,42 @@+# Create surveys through MCP++PostHog's MCP tools can create, update, launch, and stop surveys without opening the survey editor. Ask your agent to use the `creating-surveys` skill when available.++## Create a draft++Describe the feedback you need, who should receive the survey, and how it should appear. For example: "Create a draft NPS survey with an optional follow-up question for people using the settings page."++The agent uses `survey-create` to save the draft and `survey-get` to read it back for review. Omitting `start_date` keeps a new survey in draft.++Choose the delivery type that matches your goal:++| Type | Use |+| ----------------- | ---------------------------------------------------------------------- |+| `popover` | An in-app survey displayed by a supported PostHog SDK |+| `widget` | An always-available feedback button, with SDK and widget configuration |+| `external_survey` | A hosted form with a shareable public link |+| `api` | A custom form rendered and instrumented in your application |++Creating an `api` survey saves its definition. Your application still needs to display it and capture survey events.++## Review targeting and appearance++Use `conditions` for display rules such as URL and event conditions. Use `targeting_flag_filters` for person, group, or cohort properties. Cohorts containing behavioral filters cannot be used directly for survey targeting. A static snapshot is an alternative, but its membership will not update automatically.++Hosted forms do not use in-app targeting. Their public form URL is different from the management URL returned in `_posthogUrl`.++Appearance customization is optional. Removing PostHog branding with `whiteLabel: true` requires the organization's white-labelling entitlement. Popup delays must be non-negative. An agent should explain unsupported settings rather than silently changing your branding or widening the audience.++## Launch and check results++Review the saved questions, audience, schedule, and response limit before launch. Ask the agent to launch with `survey-launch` when ready. If you already requested immediate launch, the agent can continue after checking the configuration and delivery requirements.++In-app surveys require surveys to be enabled and supported by the application's SDK. Configuring an event trigger does not add event capture code to your application. An archived survey must be unarchived before launch, and a past end date must be cleared or extended when reopening it.++Use `survey-stats` or `surveys-responses-list` to check activity. Use `survey-stop` to stop collection. When updating questions, keep existing question IDs so answers remain associated with the right questions.++## Survey identifiers++Pass the returned survey `id` as the `id` argument to subsequent survey tools. Question IDs and feature flag IDs are different identifiers.++Creation is not idempotent. After a timeout, inspect existing surveys before retrying to avoid creating a duplicate.diff --git a/products/surveys/mcp/tools.yaml b/products/surveys/mcp/tools.yamlindex 0cd3af1516bb..0a5cf5bafc04 100644--- a/products/surveys/mcp/tools.yaml+++ b/products/surveys/mcp/tools.yaml@@ -14,7 +14,7 @@ ui_apps:survey-list:type: listdetail_tool: survey-get- detail_args: '{ surveyId: item.id }'+ detail_args: '{ id: item.id }'survey-stats:type: detailview_prop: data@@ -36,7 +36,8 @@ tools:enrich_url: '{id}'title: Creates a new survey in the project.description: >- Creates a new survey in the project. Use this for both in-app surveys and hosted forms. Prefer draft+ Creates a new survey in the project. For the draft, targeting, preview, and launch workflow, load the+ creating-surveys skill when available. Use this for both in-app surveys and hosted forms. Prefer draftcreation by default and do not set start_date unless the user explicitly asks to launch immediately. Forin-app surveys, popover is the default unless the user asks for widget or api. For hosted forms, useexternal_survey. Keep surveys short unless the user asks for a longer flow. Survey content is public: anyone@@ -62,6 +63,11 @@ tools:- translations- form_contentparam_overrides:+ appearance:+ description: >+ Optional appearance customization. Omit this to keep the default styling. whiteLabel=true requires+ the organization to have the white-labelling entitlement (Enterprise); leave it unset unless+ requested and available. surveyPopupDelaySeconds must be non-negative.type:description: >Survey type. Use popover for most in-app surveys, widget for always-available feedback entrypoints,@@ -94,7 +100,9 @@ tools:description: >Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one ormore rules in groups[].properties[], each with key, value, operator, and an optional type. Use this- instead of conditions for property targeting. Do not use this for external_survey forms.+ instead of conditions for property targeting. Do not use this for external_survey forms. Cohorts+ with behavioral filters cannot be used directly. Use a supported static cohort snapshot only with+ user approval; never remove targeting rules to work around validation.enable_iframe_embedding:description: >Allows an external_survey form to be embedded in an iframe. Use only when the user explicitly asks@@ -152,7 +160,8 @@ tools:description: >Launch a survey by setting `start_date` to the current time. Prefer this over `survey-update` with a manual`start_date` — it's an explicit lifecycle action and self-documenting in activity logs. No-op if the survey- is already launched.+ is already launched. Archived surveys must be unarchived first. Surveys with an end_date in the past must+ have that date cleared or extended before launch; do this only when the user asks to reopen the survey.ui_app: surveysurvey-stats:operation: surveys_stats_retrieve@@ -229,6 +238,12 @@ tools:- translations- form_contentparam_overrides:+ appearance:+ description: >+ Optional appearance customization. Omit this to preserve current styling. When changing it, fetch+ the survey first and preserve existing appearance fields. whiteLabel=true requires the organization+ to have the white-labelling entitlement (Enterprise); leave it unset unless requested and available.+ surveyPopupDelaySeconds must be non-negative.questions:description: >Complete replacement question list. Existing question IDs are tied to response data and must be@@ -247,7 +262,9 @@ tools:groups[].properties[], each with key, value, operator, and an optional type. Use this instead ofconditions for property targeting. Complete replacement: fetch the survey first, start fromtargeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this- for external_survey forms.+ for external_survey forms. Cohorts with behavioral filters cannot be used directly. Use a supported+ static cohort snapshot only with user approval; never remove targeting rules to work around+ validation.translations:description: >Complete replacement survey-level translations object. Do not provide this field unless changingdiff --git a/products/surveys/skills/creating-surveys/SKILL.md b/products/surveys/skills/creating-surveys/SKILL.mdnew file mode 100644index 000000000000..c38e369a8b6d--- /dev/null+++ b/products/surveys/skills/creating-surveys/SKILL.md@@ -0,0 +1,112 @@+---+name: creating-surveys+description: >+ Creates and launches PostHog surveys through MCP, including NPS/CSAT popovers,+ hosted feedback forms, and headless surveys. Guides survey type selection,+ audience targeting, draft review, and launch readiness. Use when asked to+ create a survey or form, or before calling survey-create. For investigating+ an existing survey's delivery or responses, use debugging-surveys instead.+---++# Creating surveys++Create a useful draft from the user's goal, then verify its audience and delivery+before launch. The workflow can run through MCP without opening the survey editor.++## Choose the delivery and questions++Infer the name, purpose, and questions from the request. Ask only for missing+information that changes who receives the survey or how it is delivered.++| User's goal | Survey type | Delivery requirement |+| --------------------------------------- | ----------------- | ---------------------------------------------------- |+| Feedback inside an app | `popover` | A supported PostHog SDK with surveys enabled |+| Always-available feedback button | `widget` | SDK support and a widget configuration |+| A shareable hosted form | `external_survey` | A hosted survey link; no in-app targeting |+| A custom form built in application code | `api` | The app renders questions and captures survey events |++Prefer one to three questions unless the user requests more. Use a rating plus+an optional open question for NPS/CSAT, or choice questions with at least two+choices. Inspect the current tool schema for question types, scales, branching,+and translations instead of guessing their JSON shapes. Minimal starting points+are in [examples](references/examples.md).++Survey names, questions, and appearance text are public content. Do not copy+private customer details into them without making that visibility clear first.++## Verify the audience and appearance++- Use `conditions` for URL, event, device, and linked-flag-variant conditions.+ Resolve existing event and flag identifiers before using them. A URL condition+ does not define a person or cohort audience.+- Use `targeting_flag_filters.groups[].properties[]` for person, group, or cohort+ targeting. Groups are alternative rules; properties within a group must all+ match. Preserve the intended audience when translating the request.+- Cohorts containing behavioral filters cannot be used directly for survey+ targeting. Explain the restriction and offer a supported static snapshot or+ another equivalent audience definition. A snapshot does not update with the+ original cohort. Get agreement before making that tradeoff; never drop a rule+ or broaden the audience to make a failed request pass.+- Hosted forms (`external_survey`) do not use in-app display conditions or+ targeting flags. Do not attach those fields to a hosted form.+- Omit `appearance` unless customization is needed. `whiteLabel: true` requires+ the organization's white-labelling entitlement (Enterprise). Do not infer it+ from a request for custom colors. Verify entitlement before setting it.+ `surveyPopupDelaySeconds` must be non-negative.+- Leave optional fields unset when unused. Do not fill them with `null` as a+ substitute for omission; question fields and nested objects have different+ nullability rules.++## Create and review the draft++Call `posthog:survey-create` with the resolved configuration. Omit `start_date`+for a draft. If the user already asked for immediate launch, continue through+the readiness check and launch without asking for the same approval again.++Keep the returned survey `id`. Subsequent survey tools use `id`, not a question+ID, feature flag ID, or survey name.++Read the saved survey with `posthog:survey-get`. Review the questions, type,+audience, schedule, response limit, and branding with the user. Show the MCP+survey app when the client supports it; otherwise give a concise text review.+Always include the returned `_posthogUrl`. A saved configuration is not evidence+that an in-app popup has rendered successfully.++For changes, call `posthog:survey-update` after fetching the saved survey.+Questions, conditions, appearance, targeting, and translations may replace+nested values. Preserve unchanged fields and existing question IDs, which link+questions to collected responses. Omit IDs only for new questions.++## Launch and verify delivery++Before `posthog:survey-launch`, confirm:++- The user authorized launch for the reviewed audience and configuration.+- The survey is not archived and has no `end_date` in the past. If reopening an+ existing survey, unarchive it or clear/extend its end date only as authorized.+- For in-app delivery, surveys are enabled in the project and the app's SDK+ supports the requested features. Event-triggered surveys need the actual+ triggering event in the app. Creating an event name in configuration does not+ instrument that event.+- For `api` surveys, the application implementation handles display and event+ capture. Creating and launching the definition does not implement that code.++Use `posthog:survey-launch` with `id`, then verify the returned state. Report+whether the survey is a draft, launched, or awaiting an SDK/setup step. For hosted+forms, return a verified public form URL when available; `_posthogUrl` is the+management page and is not a respondent link.++Use `posthog:survey-stats` or `posthog:surveys-responses-list` to check subsequent+activity. Zero responses immediately after launch do not prove delivery failed.+For a survey that should have been shown, follow `debugging-surveys`.++## Recover from errors++Read the validation field and reason before retrying. For appearance failures,+check branding entitlement and the supplied appearance fields. For targeting+failures, verify cohort support and rule structure. Preserve requested behavior+when correcting inputs; explain any change that affects the audience or branding.++Creation is not idempotent. After a timeout or uncertain result, use+`posthog:surveys-get-all` to find and inspect a possible existing draft before+retrying creation. A matching name alone is not proof that it is the same survey.diff --git a/products/surveys/skills/creating-surveys/references/examples.md b/products/surveys/skills/creating-surveys/references/examples.mdnew file mode 100644index 000000000000..9473d53ed69f--- /dev/null+++ b/products/surveys/skills/creating-surveys/references/examples.md@@ -0,0 +1,66 @@+# Minimal survey drafts++These inputs use `posthog:survey-create` and omit `start_date` so they stay drafts.+Adapt the questions to the request. Verify any event names and audience rules+against the project before adding them.++## In-app NPS++```json+{+ "name": "Product recommendation feedback",+ "type": "popover",+ "questions": [+ {+ "type": "rating",+ "question": "How likely are you to recommend this product?",+ "display": "number",+ "scale": 10+ },+ {+ "type": "open",+ "question": "What is the main reason for your score?",+ "optional": true+ }+ ]+}+```++This has no audience restriction. Add the user's intended display conditions+and targeting before launch. For CSAT, use a satisfaction question and scale 5.++## Hosted feedback form++```json+{+ "name": "Product feedback form",+ "type": "external_survey",+ "questions": [+ {+ "type": "open",+ "question": "What could make this product easier to use?"+ }+ ]+}+```++Hosted forms do not need a URL display condition, cohort, or linked feature flag.+Only enable iframe embedding when requested.++## Headless feedback form++```json+{+ "name": "In-app feedback definition",+ "type": "api",+ "questions": [+ {+ "type": "open",+ "question": "What would you like us to improve?"+ }+ ]+}+```++The application must render this form and capture the survey's events. Use the+returned survey and question IDs in that implementation; do not invent them.diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 03dab6c058ba..7f86d2ad8e72 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -10957,7 +10957,7 @@}},"survey-create": {- "description": "Creates a new survey in the project. Use this for both in-app surveys and hosted forms. Prefer draft creation by default and do not set start_date unless the user explicitly asks to launch immediately. For in-app surveys, popover is the default unless the user asks for widget or api. For hosted forms, use external_survey. Keep surveys short unless the user asks for a longer flow. Survey content is public: anyone can read the name, questions, and appearance text. In-app surveys send them to every visitor's browser, and a hosted survey shows them on its public page. Tell the user before putting a customer name or other private detail in a survey.",+ "description": "Creates a new survey in the project. For the draft, targeting, preview, and launch workflow, load the creating-surveys skill when available. Use this for both in-app surveys and hosted forms. Prefer draft creation by default and do not set start_date unless the user explicitly asks to launch immediately. For in-app surveys, popover is the default unless the user asks for widget or api. For hosted forms, use external_survey. Keep surveys short unless the user asks for a longer flow. Survey content is public: anyone can read the name, questions, and appearance text. In-app surveys send them to every visitor's browser, and a hosted survey shows them on its public page. Tell the user before putting a customer name or other private detail in a survey.","category": "Surveys","feature": "surveys","summary": "Creates a new survey in the project.",@@ -10999,7 +10999,7 @@}},"survey-launch": {- "description": "Launch a survey by setting `start_date` to the current time. Prefer this over `survey-update` with a manual `start_date` — it's an explicit lifecycle action and self-documenting in activity logs. No-op if the survey is already launched.",+ "description": "Launch a survey by setting `start_date` to the current time. Prefer this over `survey-update` with a manual `start_date` — it's an explicit lifecycle action and self-documenting in activity logs. No-op if the survey is already launched. Archived surveys must be unarchived first. Surveys with an end_date in the past must have that date cleared or extended before launch; do this only when the user asks to reopen the survey.","category": "Surveys","feature": "surveys","summary": "Launch a survey now.",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 6636135964c3..034755ad6765 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -11529,7 +11529,7 @@}},"survey-create": {- "description": "Creates a new survey in the project. Use this for both in-app surveys and hosted forms. Prefer draft creation by default and do not set start_date unless the user explicitly asks to launch immediately. For in-app surveys, popover is the default unless the user asks for widget or api. For hosted forms, use external_survey. Keep surveys short unless the user asks for a longer flow. Survey content is public: anyone can read the name, questions, and appearance text. In-app surveys send them to every visitor's browser, and a hosted survey shows them on its public page. Tell the user before putting a customer name or other private detail in a survey.",+ "description": "Creates a new survey in the project. For the draft, targeting, preview, and launch workflow, load the creating-surveys skill when available. Use this for both in-app surveys and hosted forms. Prefer draft creation by default and do not set start_date unless the user explicitly asks to launch immediately. For in-app surveys, popover is the default unless the user asks for widget or api. For hosted forms, use external_survey. Keep surveys short unless the user asks for a longer flow. Survey content is public: anyone can read the name, questions, and appearance text. In-app surveys send them to every visitor's browser, and a hosted survey shows them on its public page. Tell the user before putting a customer name or other private detail in a survey.","category": "Surveys","feature": "surveys","summary": "Creates a new survey in the project.",@@ -11571,7 +11571,7 @@}},"survey-launch": {- "description": "Launch a survey by setting `start_date` to the current time. Prefer this over `survey-update` with a manual `start_date` — it's an explicit lifecycle action and self-documenting in activity logs. No-op if the survey is already launched.",+ "description": "Launch a survey by setting `start_date` to the current time. Prefer this over `survey-update` with a manual `start_date` — it's an explicit lifecycle action and self-documenting in activity logs. No-op if the survey is already launched. Archived surveys must be unarchived first. Surveys with an end_date in the past must have that date cleared or extended before launch; do this only when the user asks to reopen the survey.","category": "Surveys","feature": "surveys","summary": "Launch a survey now.",diff --git a/services/mcp/src/tools/generated/surveys.ts b/services/mcp/src/tools/generated/surveys.tsindex ce57282a2c82..e4e30ea45b54 100644--- a/services/mcp/src/tools/generated/surveys.ts+++ b/services/mcp/src/tools/generated/surveys.ts@@ -26,6 +26,9 @@ const SurveyCreateSchema = () => {base_language: true,_create_in_folder: true,}).extend({+ appearance: SurveysCreateBody.shape['appearance'].describe(+ 'Optional appearance customization. Omit this to keep the default styling. whiteLabel=true requires the organization to have the white-labelling entitlement (Enterprise); leave it unset unless requested and available. surveyPopupDelaySeconds must be non-negative.'+ ),type: SurveysCreateBody.shape['type'].describe('Survey type. Use popover for most in-app surveys, widget for always-available feedback entrypoints, external_survey for hosted forms with a shareable public URL, and api only for headless custom implementations.'),@@ -45,7 +48,7 @@ const SurveyCreateSchema = () => {'Feature flag ID linked to this survey. Use only when the user explicitly wants the survey linked to a feature flag. Resolve the flag ID first, preferably with SQL in v2.'),targeting_flag_filters: SurveysCreateBody.shape['targeting_flag_filters'].describe(- 'Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one or more rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Do not use this for external_survey forms.'+ 'Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one or more rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Do not use this for external_survey forms. Cohorts with behavioral filters cannot be used directly. Use a supported static cohort snapshot only with user approval; never remove targeting rules to work around validation.'),enable_iframe_embedding: SurveysCreateBody.shape['enable_iframe_embedding'].describe('Allows an external_survey form to be embedded in an iframe. Use only when the user explicitly asks for iframe embedding.'@@ -250,6 +253,9 @@ const SurveyUpdateSchema = () => {}).shape).extend({+ appearance: SurveysPartialUpdateBody.shape['appearance'].describe(+ 'Optional appearance customization. Omit this to preserve current styling. When changing it, fetch the survey first and preserve existing appearance fields. whiteLabel=true requires the organization to have the white-labelling entitlement (Enterprise); leave it unset unless requested and available. surveyPopupDelaySeconds must be non-negative.'+ ),questions: SurveysPartialUpdateBody.shape['questions'].describe("Complete replacement question list. Existing question IDs are tied to response data and must be preserved. Before sending this field, fetch the survey first, modify the existing question objects in place, keep every unchanged or edited question's id, and include the complete intended ordered question list. New questions should omit id. Do not regenerate existing questions from scratch."),@@ -257,7 +263,7 @@ const SurveyUpdateSchema = () => {'Complete replacement display conditions object. Do not provide this field unless changing display targeting. Use targeting_flag_filters for person, group, or cohort property targeting. Preserve existing URL, selector, event, device, wait-period, and linked flag variant conditions unless explicitly changing them.'),targeting_flag_filters: SurveysPartialUpdateBody.shape['targeting_flag_filters'].describe(- "Update an in-app survey's person, group, or cohort property targeting. Pass rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Complete replacement: fetch the survey first, start from targeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this for external_survey forms."+ "Update an in-app survey's person, group, or cohort property targeting. Pass rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Complete replacement: fetch the survey first, start from targeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this for external_survey forms. Cohorts with behavioral filters cannot be used directly. Use a supported static cohort snapshot only with user approval; never remove targeting rules to work around validation."),translations: SurveysPartialUpdateBody.shape['translations'].describe('Complete replacement survey-level translations object. Do not provide this field unless changing translations. Preserve existing language keys and translated fields that should remain. Use null only when the user explicitly asks to remove survey-level translations.'diff --git a/services/mcp/src/ui-apps/apps/generated/survey-list.tsx b/services/mcp/src/ui-apps/apps/generated/survey-list.tsxindex d61cd2627b32..f72c249ac4ab 100644--- a/services/mcp/src/ui-apps/apps/generated/survey-list.tsx+++ b/services/mcp/src/ui-apps/apps/generated/survey-list.tsx@@ -37,7 +37,7 @@ function SurveyListContent({ data, app }: { data: SurveyListData; app: App | nultry {const result = await app.callServerTool({name: 'survey-get',- arguments: { surveyId: item.id },+ arguments: { id: item.id },})if (result.isError || !result.structuredContent) {fallbackToChat(item.name)diff --git a/services/mcp/src/ui-apps/generated/render-dispatch.generated.tsx b/services/mcp/src/ui-apps/generated/render-dispatch.generated.tsxindex feeace1b77c3..977abd1273b5 100644--- a/services/mcp/src/ui-apps/generated/render-dispatch.generated.tsx+++ b/services/mcp/src/ui-apps/generated/render-dispatch.generated.tsx@@ -276,7 +276,7 @@ function SurveyListContent({ data, app }: { data: SurveyListData; app: App | nultry {const result = await app.callServerTool({name: 'survey-get',- arguments: { surveyId: item.id },+ arguments: { id: item.id },})if (result.isError || !result.structuredContent) {fallbackToChat(item.name)diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-create.jsonindex 23382d9b31dd..6f72a5f7f321 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-create.json@@ -111,7 +111,7 @@"type": "null"}],- "description": "Survey appearance customization."+ "description": "Optional appearance customization. Omit this to keep the default styling. whiteLabel=true requires the organization to have the white-labelling entitlement (Enterprise); leave it unset unless requested and available. surveyPopupDelaySeconds must be non-negative."},"conditions": {"anyOf": [@@ -1178,7 +1178,7 @@"type": "null"}],- "description": "Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one or more rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Do not use this for external_survey forms."+ "description": "Target an in-app survey to a subset of users by person, group, or cohort properties. Pass one or more rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Do not use this for external_survey forms. Cohorts with behavioral filters cannot be used directly. Use a supported static cohort snapshot only with user approval; never remove targeting rules to work around validation."},"translations": {"description": "Optional survey-level translations keyed by language code. Use for translated survey name, description, and thank-you message fields. Question text translations belong inside each question's translations object."diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-update.jsonindex ccb757b2607e..32680448341b 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/survey-update.json@@ -111,7 +111,7 @@"type": "null"}],- "description": "Survey appearance customization."+ "description": "Optional appearance customization. Omit this to preserve current styling. When changing it, fetch the survey first and preserve existing appearance fields. whiteLabel=true requires the organization to have the white-labelling entitlement (Enterprise); leave it unset unless requested and available. surveyPopupDelaySeconds must be non-negative."},"archived": {"description": "Archive state for the survey.",@@ -1209,7 +1209,7 @@"type": "null"}],- "description": "Update an in-app survey's person, group, or cohort property targeting. Pass rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Complete replacement: fetch the survey first, start from targeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this for external_survey forms."+ "description": "Update an in-app survey's person, group, or cohort property targeting. Pass rules in groups[].properties[], each with key, value, operator, and an optional type. Use this instead of conditions for property targeting. Complete replacement: fetch the survey first, start from targeting_flag.filters, and send the full groups list — omitted groups are removed. Do not use this for external_survey forms. Cohorts with behavioral filters cannot be used directly. Use a supported static cohort snapshot only with user approval; never remove targeting rules to work around validation."},"targeting_flag_id": {"description": "An existing targeting flag to use for this survey.",