publish_virtual_dimension
Validate the latest persisted pending virtual dimension draft, then promote it to published and start a warehouse refresh of its data. virtualDimensionId in inputs equals id from list/get/search. Use when the user asks to publish a validated virtual-dimension draft. Requires a pending draft row — call update_virtual_dimension_draft for an existing virtualDimensionId (or create_virtual_dimension_draft for a brand-new VDIM) before publish. Preview alone does not create a draft. Rejects invalid drafts with draftValidation errors (no publish). refreshWindow is required. Ask the user which window to use, then pass their answer — do not omit it or assume current_month. Options: current_month (from the 1st of the month of today minus 15 days), last_3_months, history (last 3 months now, all history tomorrow morning; 3 per organization per 30 days, and a publish over that limit is rejected with isError and publishes nothing), or skip (no refresh now; the daily update recomputes its window). Older months keep the previous version unless history is chosen. On success returns virtualDimensionId, immutable bqName, name, computeStatus, and published rules — and refresh: requested, window (null when no live refresh started), from, downgradedFrom, notStartedReason (why a live refresh was refused), nextMorning, budget. It does not wait for the refresh job. Once the refresh completes, query using returned bqName for groupBy/filterCel in query — bqName is immutable (set at create from the initial name) and does not change when name is renamed. computeStatus is REFRESHING when the refresh job was queued (async — poll via get or list_virtual_dimensions until COMPLETED before querying). TO_REFRESH means no live refresh started now: the rules are published and the draft is consumed. Read refresh.requested and refresh.nextMorning: a skip publish, or a refused run with nextMorning catch_up, is picked up by the daily update, so it is not an error. Do not publish again. This tool cannot retry only the refresh. Clerk MCP only — not available on the service route.
Effects: Replaces published rules with the saved draft and, unless refreshWindow is skip, starts a warehouse refresh. Scope: Authorized Costory workspace only.
EXAMPLE: "Publish the Environment VDIM draft" → ask which refreshWindow, then { virtualDimensionId: "<virtualDimensionId from create/list>", refreshWindow: "current_month" }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"virtualDimensionId": "<virtualDimensionId>",
"refreshWindow": "<refreshWindow>"
},
"name": "publish_virtual_dimension"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Organization slug. Omit to auto-detect from your account (fails if you belong to multiple orgs). | |
| context | No | Optional context used only for analytics; it does not affect tool execution. Omit it by default. Do not include conversation text, personal information, or workspace data. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| refreshWindow | Yes | Required. Ask the user which window to refresh, then pass their choice. Do not omit or assume current_month. current_month: from the 1st of the month of today minus 15 days. last_3_months: last 3 months. history: last 3 months now and all history tomorrow morning (3 per org per 30 days). skip: no refresh now. | |
| conversation_id | No | The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics. | |
| virtualDimensionId | Yes | Virtual dimension id (stable public identifier) |