Upsert the virtual dimension draft for an existing `virtualDimensionId` — updates a pending draft or seeds one from published state when none exists (response may include `warning: "Initialized draft from published state"`). `virtualDimensionId` in inputs equals `id` from list/get/search. Use create_virtual_dimension_draft only for brand-new VDIMs. Call get_skill with skillId: "virtual-dimensions" first — see skill for allocation shapes and workflow. For a new `telemetry` allocation, discover a live integration metric via list_metrics with includeExternal: true and a specific search term, then persist inline `externalMetric` { provider, integrationId, metricName, aggregator, groupByFields }. For BigQuery/S3, also set dateColumn and metricColumn from the returned `schema` (first DATE / first NUMERIC) and gapFillingMethod (default FORWARD_FILL). Catalog-complete providers (Tsuga, Datadog, CloudWatch, Amplitude, Google Cloud Monitoring) do not need those fields. Do not set `datasource` on new reallocations (echo a leftover stored `datasource` unchanged unless the user asks to switch). `bqName` is immutable; use returned `bqName` for groupBy/filterCel in query. Declarative: `rules` is optional — omit to change only metadata (`name`, `description`, `tagNames`); when provided, fully replaces the rules array. Omitting `rules` on a published-only VDIM still persists a draft (metadata-only promotion). Carry forward each existing rule's `id` and `allocation` from get; ids are sticky — reorder by moving `id` with its rule. Do not include leftover in `rules`. Rejects invalid payloads — nothing persisted unless validation passes. On success: `values`, `draftValidation: { ok: true }`, `draftPersisted: true`. Does not publish or refresh BigQuery. Clerk MCP only.
EXAMPLE: "Add staging to Environment VDIM" — `rules` is the full desired set → { virtualDimensionId: "<id from create/list>", rules: [{ id: "<uuid from get>", name: "Production", conditionCel: "cos_environment in [\"prod\"]", allocation: { allocationType: "dimensionValue", dimensionValue: "prod" } }, { name: "Staging", conditionCel: "cos_environment in [\"staging\"]", allocation: { allocationType: "dimensionValue", dimensionValue: "staging" } }] }
ConnectorOAuth