Skip to main content
Glama

Costory: Your Finops MCP

publish_virtual_dimension

Destructive

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

NameRequiredDescriptionDefault
slugNoOrganization slug. Omit to auto-detect from your account (fails if you belong to multiple orgs).
contextNoOptional 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_modelNoThe 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.
refreshWindowYesRequired. 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_idNoThe 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.
virtualDimensionIdYesVirtual dimension id (stable public identifier)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / refreshWindow
      Added value: +{
      +  "description": "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.",
      +  "enum": [
      +    "current_month",
      +    "last_3_months",
      +    "history",
      +    "skip"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "virtualDimensionId"
      -]New value: +[
      +  "virtualDimensionId",
      +  "refreshWindow"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / context / description
      Previous value: -"A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details."New value: +"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."
    • changedInput schema / required
      Previous value: -[
      -  "virtualDimensionId",
      -  "context"
      -]New value: +[
      +  "virtualDimensionId"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / context / description
      Previous value: -"Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\""New value: +"A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details."
    • changedInput schema / required
      Previous value: -[
      -  "virtualDimensionId",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "virtualDimensionId",
      +  "context"
      +]
  4. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "virtualDimensionId"
      -]New value: +[
      +  "virtualDimensionId",
      +  "context",
      +  "llm_model"
      +]
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnly=false and destructive=true; the description goes far beyond by naming exactly what is replaced (published rules overwritten by the saved draft), that the draft is consumed, the rate limit (3 history refreshes per org per 30 days with rejection semantics), that the call is async and does not wait for the job, and how to poll computeStatus. It also explains that a refused or skipped refresh is not an error and is picked up by the daily update, which prevents an agent from misreading a partial-failure outcome.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, then prerequisites, then the refreshWindow decision, then return shape, then error semantics — a sensible order. Some content duplicates the schema's refreshWindow description verbatim in spirit, and the return-value paragraph is dense, but nearly every sentence carries decision-relevant information for a destructive async tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description fully covers the return payload (virtualDimensionId, immutable bqName, computeStatus, published rules, and each refresh sub-field) and explains how to act on REFRESHING vs TO_REFRESH. For a destructive, async, rate-limited mutation, the agent has everything needed to call it and to interpret the result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description still adds meaning by tying virtualDimensionId to the `id` returned from list/get/search, and by spelling out the real-world consequences of each refreshWindow enum value (history budget, month boundary math, what older months retain). It does not add much on the analytics-only params, but those are self-documenting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific three-step verb chain (validate, promote to published, start warehouse refresh) on a named resource (persisted pending virtual dimension draft). It explicitly contrasts with adjacent tools by name (update_virtual_dimension_draft, create_virtual_dimension_draft, preview), so an agent can distinguish it without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the triggering user intent ('publish a validated virtual-dimension draft') and the hard prerequisite (a pending draft row must exist, created via update_/create_virtual_dimension_draft; preview does not create one). It also tells the agent not to retry the refresh with this tool and to ask the user for refreshWindow rather than assuming a default, which is explicit when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources