: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(mcp): remove the experiment-get-all alias (#101042)
Anders63cd698c394d
diff --git a/products/desktop/packages/agent/src/adapters/claude/permissions/permission-handlers.test.ts b/products/desktop/packages/agent/src/adapters/claude/permissions/permission-handlers.test.tsindex 89b9493ad89f..fff300c5caf8 100644--- a/products/desktop/packages/agent/src/adapters/claude/permissions/permission-handlers.test.ts+++ b/products/desktop/packages/agent/src/adapters/claude/permissions/permission-handlers.test.ts@@ -215,7 +215,7 @@ describe("canUseTool MCP approval enforcement", () => {setMcpToolApprovalStates({ mcp__posthog__exec: "approved" });const context = createContext("mcp__posthog__exec", {- toolInput: { command: "call experiment-get-all {}" },+ toolInput: { command: "call experiment-list {}" },});const result = await canUseTool(context);@@ -400,7 +400,7 @@ describe("canUseTool MCP approval enforcement", () => {setMcpToolApprovalStates({ mcp__posthog__exec: "approved" });const context = createContext("mcp__posthog__exec", {- toolInput: { command: "call experiment-get-all {}" },+ toolInput: { command: "call experiment-list {}" },session: {permissionMode: "bypassPermissions",posthogExecPermissionRegex,diff --git a/products/posthog_ai/evals/experiments/eval_lifecycle_skills.py b/products/posthog_ai/evals/experiments/eval_lifecycle_skills.pyindex b8045cf03d3c..f1d0f956b849 100644--- a/products/posthog_ai/evals/experiments/eval_lifecycle_skills.py+++ b/products/posthog_ai/evals/experiments/eval_lifecycle_skills.py@@ -93,9 +93,9 @@ async def eval_lifecycle_skills(ctx: EvalContext) -> None:experiment_name="sandboxed-experiments-lifecycle-cli",cases=cases,scorers=[- # Agent must look up the named experiment (either tool counts).+ # Agent must look up the named experiment.RequiredToolCall(- required={"experiment-list", "experiment-get-all"},+ required={"experiment-list"},name="resolved_experiment_by_name",),# Case 1 specifically: agent must NOT ship without asking.diff --git a/products/posthog_ai/evals/experiments/eval_unknown_events_confirmation.py b/products/posthog_ai/evals/experiments/eval_unknown_events_confirmation.pyindex 8d82cb859a2a..d34379afeb26 100644--- a/products/posthog_ai/evals/experiments/eval_unknown_events_confirmation.py+++ b/products/posthog_ai/evals/experiments/eval_unknown_events_confirmation.py@@ -70,7 +70,7 @@ async def eval_unknown_events_confirmation(ctx: EvalContext) -> None:scorers=[# Agent must look up the named experiment first.RequiredToolCall(- required={"experiment-list", "experiment-get-all"},+ required={"experiment-list"},name="resolved_experiment_by_name",),# No successful experiment-update is allowed in this scenario:diff --git a/products/product_analytics/skills/investigate-metric/SKILL.md b/products/product_analytics/skills/investigate-metric/SKILL.mdindex a83b06ad8e8d..7a2e7130e7ab 100644--- a/products/product_analytics/skills/investigate-metric/SKILL.md+++ b/products/product_analytics/skills/investigate-metric/SKILL.md@@ -33,7 +33,7 @@ Targets PostHog MCP v2. Typed query tools accept the query body directly — pas| `posthog:insight-get` / `-query` | Fetch a saved insight's metadata / data |Plus the standard PostHog tools the playbooks reference by name (`feature-flag-get-all`,-`experiment-get-all`, `annotations-list`, `query-error-tracking-issues-list`, `query-logs`,+`experiment-list`, `annotations-list`, `query-error-tracking-issues-list`, `query-logs`,`query-session-recordings-list`, `cohorts-list/-create`, `annotation-create`,`insight-create`).@@ -101,7 +101,7 @@ normal variance, report that and stop.In rough order of signal:- `posthog:feature-flag-get-all` → flags with `updated_at` near the anomaly start.-- `posthog:experiment-get-all` → `start_date` / `end_date` near the start.+- `posthog:experiment-list` → `start_date` / `end_date` near the start.- `posthog:annotations-list` → `date_marker` near the start.- `git log` for the window if the repo is reachable (highest signal when available).diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 008601ce5301..ad52f497fd85 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -4513,20 +4513,6 @@"readOnlyHint": true}},- "experiment-get-all": {- "description": "DEPRECATED: renamed to experiment-list. This alias forwards to experiment-list and will be removed. Call experiment-list directly with the same arguments.",- "category": "Experiments",- "feature": "experiments",- "summary": "Deprecated alias for experiment-list.",- "title": "Get all experiments (deprecated)",- "required_scopes": ["experiment:read"],- "annotations": {- "destructiveHint": false,- "idempotentHint": true,- "openWorldHint": true,- "readOnlyHint": true- }- },"experiment-holdouts-create": {"description": "Create a holdout group — a reserved slice of users excluded from experiment exposure, used as a held-back baseline. Requires name and a non-empty filters array. Link experiments to it afterwards by passing the returned id as holdout_id on experiment-create or experiment-update. Note that you can't change which holdout an experiment points to once that experiment is running; the holdout itself stays editable (see experiment-holdouts-partial-update, whose edits cascade to all linked experiments).","category": "Experiments",diff --git a/services/mcp/schema/tool-definitions.json b/services/mcp/schema/tool-definitions.jsonindex 4a53d38172df..478206655fab 100644--- a/services/mcp/schema/tool-definitions.json+++ b/services/mcp/schema/tool-definitions.json@@ -102,20 +102,6 @@"readOnlyHint": true}},- "experiment-get-all": {- "description": "DEPRECATED: renamed to experiment-list. This alias forwards to experiment-list and will be removed. Call experiment-list directly with the same arguments.",- "category": "Experiments",- "feature": "experiments",- "summary": "Deprecated alias for experiment-list.",- "title": "Get all experiments (deprecated)",- "required_scopes": ["experiment:read"],- "annotations": {- "destructiveHint": false,- "idempotentHint": true,- "openWorldHint": true,- "readOnlyHint": true- }- },"llma-skill-archive": {"description": "DEPRECATED: renamed to skill-archive. This alias forwards to skill-archive and will be removed. Call skill-archive directly with the same arguments.","category": "Skills",diff --git a/services/mcp/src/tools/experiments/listDeprecated.ts b/services/mcp/src/tools/experiments/listDeprecated.tsdeleted file mode 100644index a5254bd2e049..000000000000--- a/services/mcp/src/tools/experiments/listDeprecated.ts+++ /dev/null@@ -1,27 +0,0 @@-import type { z } from 'zod'--import { GENERATED_TOOLS } from '@/tools/generated/experiments'-import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'--/**- * Deprecation alias for the renamed `experiment-list` tool. Forwards arguments- * to the current handler and annotates the response so agents discover the new- * name without the call failing. Remove once callers have migrated.- */-const experimentListDeprecated = (): ToolBase<ZodObjectAny> => {- const inner = GENERATED_TOOLS['experiment-list']!()- return {- ...inner,- name: 'experiment-get-all',- handler: async (context: Context, params: z.infer<ZodObjectAny>) => {- const result = await inner.handler(context, params)- return {- ...(result as object),- _deprecation_notice:- 'experiment-get-all has been renamed to experiment-list. Call experiment-list directly next time — this alias will be removed.',- }- },- }-}--export default experimentListDeprecateddiff --git a/services/mcp/src/tools/index.ts b/services/mcp/src/tools/index.tsindex dc782ef1e4c2..5a045deb493e 100644--- a/services/mcp/src/tools/index.ts+++ b/services/mcp/src/tools/index.ts@@ -9,7 +9,6 @@ import parserRecipeReference from './aiObservability/parserRecipeReference'import debugMcpUiApps from './debug/debugMcpUiApps'// Experiments (hand-written — CRUD + lifecycle are codegen in generated/experiments.ts)import getExperimentResults from './experiments/getResults'-import experimentListDeprecated from './experiments/listDeprecated'// Feature flagsimport featureFlagGetDefinitionByKey from './featureFlags/getDefinitionByKey'import updateFeatureFlagPreservingGroups from './featureFlags/updateFeatureFlag'@@ -95,8 +94,6 @@ export const TOOL_MAP: Record<string, () => ToolBase<ZodObjectAny>> = {// Experiments (results is hand-written; CRUD + lifecycle are codegen)'experiment-results-get': getExperimentResults,- // Deprecated alias for experiment-list — forwards and annotates the response.- 'experiment-get-all': experimentListDeprecated,// Insights'insight-query': queryInsight,diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-get-all.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-get-all.jsondeleted file mode 100644index 890c3a3738b8..000000000000--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-get-all.json+++ /dev/null@@ -1,47 +0,0 @@-{- "$schema": "https://json-schema.org/draft/2020-12/schema",- "properties": {- "archived": {- "description": "Filter by archived state. Defaults to non-archived experiments only.",- "type": "boolean"- },- "created_by_id": {- "description": "Filter to experiments created by the given user(s). Accepts a single user ID, or a JSON-encoded / comma-separated list of user IDs to match any of them.",- "type": "string"- },- "event": {- "description": "Filter to experiments whose metrics reference this event name. Matches events used directly in metric queries as well as events behind any actions those metrics reference.",- "type": "string"- },- "feature_flag_id": {- "description": "Filter to experiments linked to the given feature flag ID.",- "type": "number"- },- "limit": {- "description": "Number of results to return per page.",- "type": "number"- },- "offset": {- "description": "The initial index from which to return the results.",- "type": "number"- },- "order": {- "description": "Field to order by. Prefix with '-' for descending. Allowlisted fields include name, created_at, updated_at, start_date, end_date, duration, and status.",- "type": "string"- },- "prompt_name": {- "description": "Filter to experiments created from an LLM prompt with this name. Matches experiments whose parameters.prompt_metadata.name equals the given value.",- "type": "string"- },- "search": {- "description": "Free-text search applied to the experiment name (case-insensitive).",- "type": "string"- },- "status": {- "description": "Filter by experiment status. Values: \"draft\" (not yet launched), \"running\" (launched, flag active), \"paused\" (launched, flag deactivated — mutually exclusive with running), \"exposure_frozen\" (launched, enrollment frozen to the already-exposed cohort while metrics keep flowing), \"stopped\" or \"complete\" (both mean ended), \"all\" (no filter). Defaults to all non-archived experiments.",- "enum": ["all", "complete", "draft", "exposure_frozen", "paused", "running", "stopped"],- "type": "string"- }- },- "type": "object"-}