publish_label_dimensions
Merge add/update/delete operations onto published label dimensions, then replace the stored document (one feature-engineering refresh, about 10 minutes). Use when the user wants to save merged label-dimension changes (preview with dryRun: true first). Input is operations[], never the full labels array — sibling labels you do not mention are kept. add: sourceKeys (required), optional name/maps (id is generated). update/delete: target by id from list_label_dimensions (or an id created by an earlier add in the same array). Duplicate sourceKeys across labels are rejected; move a key with update on the owner in the same array. Names must be unique across labels and virtual dimension bqNames (default name is a sanitized sourceKeys[0]); a collision rejects the whole operations array — send a different unique name. Deleting a label and adding it back (same name or sourceKeys) in the same array is allowed, in either order. dryRun defaults true (preview the full next labels document, no write). Persist once with dryRun: false and confirm: true. Check list_label_dimension_usages before rename or delete. Demo orgs are read-only unless the Clerk caller is an org admin on that tenant; dimensionsAdminOnly requires an org admin. Real write is Clerk MCP only — the service route accepts dry-run only. Do not call publish twice. EXAMPLES: • Preview adding environment + team → { dryRun: true, operations: [{ op: "add", sourceKeys: ["env", "environment"], name: "environment", maps: [{ value: "prd", to: "production" }] }, { op: "add", sourceKeys: ["team"], name: "team" }] } • Persist the same ops once → { dryRun: false, confirm: true, operations: [] }
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": {
"operations": "<operations>",
"context": "<context>"
},
"name": "publish_label_dimensions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Organization slug. Omit to auto-detect from your account (fails if you belong to multiple orgs). | |
| dryRun | No | When true (default), merge and validate only — no Prisma write and no feature-engineering job. | |
| confirm | No | Must be true to persist. Merges add/update/delete onto all existing label dimensions, replaces the stored document, and starts a feature-engineering refresh that takes about 10 minutes. Put every change into this one call. Check list_label_dimension_usages before delete or rename. | |
| context | Yes | 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. | |
| 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. | |
| operations | Yes | add / update / delete operations applied in order onto the currently published labels. | |
| 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. |