Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(experiments): correct running_time_calculation MCP tool description (#66611)

Anders79a32cd81ac3
diff --git a/products/experiments/mcp/tools.yaml b/products/experiments/mcp/tools.yaml
index c627205beadc..30782985350f 100644
--- a/products/experiments/mcp/tools.yaml
+++ b/products/experiments/mcp/tools.yaml
@@ -862,9 +862,7 @@ tools:
Persist a running-time / sample-size plan onto the experiment (the planning target shown in the
experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage,
e.g. 20 for a 20% lift), recommended_sample_size (total across all variants),
- recommended_running_time (days), and exposure_estimate_config. These values are kept in sync with
- the legacy parameters.* keys during the deprecation window, so prefer this field over writing the
- calculator keys inside parameters.
+ recommended_running_time (days), and exposure_estimate_config.
saved_metrics_ids:
input_schema: SavedMetricsAttachSchema
ui_app: experiment
diff --git a/services/mcp/src/tools/generated/experiments.ts b/services/mcp/src/tools/generated/experiments.ts
index 77442c489838..23c83b9f9fa8 100644
--- a/services/mcp/src/tools/generated/experiments.ts
+++ b/services/mcp/src/tools/generated/experiments.ts
@@ -750,7 +750,7 @@ const ExperimentUpdateSchema = ExperimentsPartialUpdateParams.omit({ project_id:
.extend({
id: z.preprocess(castStringToInt, ExperimentsPartialUpdateParams.shape['id']),
running_time_calculation: ExperimentsPartialUpdateBody.shape['running_time_calculation'].describe(
- "Persist a running-time / sample-size plan onto the experiment (the planning target shown in the experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage, e.g. 20 for a 20% lift), recommended_sample_size (total across all variants), recommended_running_time (days), and exposure_estimate_config. These values are kept in sync with the legacy parameters.* keys during the deprecation window, so prefer this field over writing the calculator keys inside parameters."
+ "Persist a running-time / sample-size plan onto the experiment (the planning target shown in the experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage, e.g. 20 for a 20% lift), recommended_sample_size (total across all variants), recommended_running_time (days), and exposure_estimate_config."
),
saved_metrics_ids: SavedMetricsAttachSchema.optional(),
})
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-update.json
index 9cf61d47298d..7bdb3393df00 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-update.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/experiment-update.json
@@ -3770,7 +3770,7 @@
"type": "null"
}
],
- "description": "Persist a running-time / sample-size plan onto the experiment (the planning target shown in the experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage, e.g. 20 for a 20% lift), recommended_sample_size (total across all variants), recommended_running_time (days), and exposure_estimate_config. These values are kept in sync with the legacy parameters.* keys during the deprecation window, so prefer this field over writing the calculator keys inside parameters."
+ "description": "Persist a running-time / sample-size plan onto the experiment (the planning target shown in the experiment's running-time panel). Object with optional keys: minimum_detectable_effect (percentage, e.g. 20 for a 20% lift), recommended_sample_size (total across all variants), recommended_running_time (days), and exposure_estimate_config."
},
"saved_metrics_ids": {
"description": "The complete desired set of shared (saved) metrics for the experiment — this REPLACES all existing saved-metric links, it does not append. To add or remove one, first read the experiment's current saved_metrics via experiment-get and resend the full set. Pass an empty array to detach all shared metrics.",