Generated banner for Ontology CLI
Generated logo for Ontology CLI

Ontology CLI

MicrosoftOfficialPublished by Microsoft

  • Skill
  • Tool integration
  • Data and AI
  • MIT
  • No issues found

From the author

Manages Microsoft Fabric Ontology items: authors legacy V1 entity/relationship definitions and answers questions for new-experience (V2) Ontologies through ask_ontology. Use for Ontology item operations or grounded questions; V2 authoring/upgrades and V1 queries are unsupported. Power BI data questions use fabriciq, report authoring powerbi-report-cli, and model/DAX changes semantic-model-authoring.
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The ontology-cli skill provides a specialized interface for interacting with Microsoft Fabric Ontology items. It operates in two distinct, non-convertible modes: an authoring mode for managing legacy V1 entity and relationship definitions, and a consumption mode for querying new-experience (V2) Ontologies. The skill acts as a mode dispatcher, requiring users to read specific reference documentation before executing commands to ensure correct payload generation and state management. It does not support V1-to-V2 upgrades or V2 authoring.

What it does

  • Creates and updates legacy V1 Ontology entity and relationship definitions.
  • Answers natural-language questions about existing new-experience (V2) Ontologies.
  • Generates grounded code or data insights from V2 Ontologies via the Ontology Agent.
  • Manages data bindings for V1 Ontology entity types.
  • Provides a structured workflow for resolving workspace and item identifiers.

When to use it

  • When you need to define or modify the structure of a legacy V1 Ontology.
  • When you need to query data or metadata from a new-experience (V2) Ontology.
  • When you need to generate runnable code based on V2 Ontology rules.
  • When you are working within the Microsoft Fabric ecosystem and require specific Ontology item operations.

Advantages

  • Ensures grounded, validated responses by using the Ontology Agent for V2 queries.
  • Provides a clear separation between legacy authoring and modern consumption workflows.
  • Reduces errors by enforcing mandatory reference reading before command execution.
  • Maintains consistency in Fabric item management through standardized CLI patterns.

Usage examples

“Using the ClinicOperations ontology, how many clinics are there?”
The agent enters consumption mode, verifies the ontology, and queries the data to return the clinic count.
“Create a legacy V1 ontology item with Customer and Order entity types bound to the lakehouse.”
The agent enters authoring mode, prepares the required JSON definition tree, and executes the creation call.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/ontology-cli/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip ontology-cli.zip -d .agents/skills

Documentation by Microsoft

Telemetry — MANDATORY. Every api.fabric.microsoft.com call must carry x-ms-fabric-skill: ontology-cli (az rest: --headers "x-ms-fabric-skill=ontology-cli"), including every LRO poll, fabric_lro and retry. Snippets omit it — add it anyway.

CRITICAL NOTES

  1. To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering

  2. To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering

  3. Skill disambiguation: use ontology-cli for operations on an Ontology item and questions grounded in that Ontology. Natural-language data questions over existing Power BI reports/models are fabriciq; report creation, editing, publishing, or rebinding is powerbi-report-cli; semantic-model or DAX authoring is semantic-model-authoring. Naming an Ontology as a report's data source does not move report authoring into this skill.

  4. Consumption runs through the Ontology Agent MCP server, never around it. Do not decode an ontology definition to hand-compose KQL / T-SQL / Spark SQL, and do not delegate ontology data questions to eventhouse-cli / sqldw-cli / spark-cli. That path loses the agent's grounding and validation and is not metered.

  5. Natural-language consumption supports only new-experience (V2) Ontologies. Call tools/list first. If ask_ontology is absent, stop and tell the user that V1 natural-language queries are unsupported and the Ontology must be upgraded or recreated in the new experience outside this skill's authoring flow. Never fall back to search_ontology.

  6. Authoring is legacy V1-only. The JSON EntityTypes/.../definition.json item-definition flow below cannot create, convert, or upgrade a new-experience (V2) Ontology. Do not route a V2 upgrade/recreation request into authoring.

  7. Kusto bindings use the parent Eventhouse item ID, never the KQL database ID. Validate the staged binding against discovered source metadata before presenting an authoring preview; unresolved or mismatched source identities block the write.

Ontology CLI Skill

This skill owns two explicit, non-convertible surfaces: legacy V1 JSON-definition authoring, and read-only questions over existing new-experience (V2) Ontologies through the Ontology Agent MCP endpoint. It does not upgrade V1 items to V2 or author V2 items.

It is a mode dispatcher and contains NO procedures. Pick the mode that matches the request from the table below, then read the matching references/<mode>.md file end to end with your file-reading tool BEFORE issuing a single command. That file holds the endpoints, payload shapes, templates and gotchas; acting without it produces wrong payloads and wrong results.

Mode selection

ModeUse when the request ...Example triggersRead this first
authoringcreates or updates a legacy V1 Ontology's JSON entity/relationship definitions or data bindings; V2 creation/upgrade is out of scopecreate legacy ontology item, bind V1 entity type, add V1 relationship type, update legacy ontology definitionreferences/authoring.md
consumptionasks a question about an existing new-experience (V2) Ontology -- its data, entities, or rules -- or wants grounded runnable code generated from ithow many clinics are there, which treatment rooms are busiest, what entities exist, list the ontology rules, generate KQL from this ontologyreferences/consumption.md

Consumption sub-references (read directly, not through chained links):

Mode boundary rule

consumption is read-only. Any definition write goes through the authoring mode's preview-and-confirm flow -- never call updateDefinition from a consumption request.

If a request genuinely spans modes, handle them one at a time and read each reference before you start that part. If the mode is ambiguous after reading this table, ask one short clarifying question instead of guessing.

Terminal write -- the step you must not skip

Reading the reference and planning the change is NOT completing the task. Each mutating mode ends with one state-changing call. If you did not issue it, nothing was persisted -- say so explicitly rather than reporting success.

ModeTerminal write
authoringcreateItem (POST /v1/workspaces/{ws}/items) to create a legacy V1 Ontology, then POST .../updateDefinition to persist entity types, relationships and bindings. This cannot create or upgrade V2.
consumptionnone -- this mode is read-only

Before you report the task done, confirm the terminal call returned success and, where the reference documents a readback, read the artefact back to prove the change landed.

Shared essentials (all modes)

Resolve the workspace and item first; every mode depends on it.

TaskReferenceNotes
Finding Workspaces and Items in FabricCOMMON-CLI.mdMandatory -- read before resolving any workspace or item id
Catalog SearchCOMMON-CORE.mdRequest/response shape, Catalog.Read.All scope, 24 h indexing delay
Pagination PatternCOMMON-CLI.mdCatalog Search and item listings both page via continuationToken
Fabric Topology & Key ConceptsCOMMON-CORE.mdItem types, workspaces, capacities
Environment URLsCOMMON-CORE.mdSovereign / non-public cloud hosts
Authentication & Token AcquisitionCOMMON-CORE.mdWrong audience = 401; read before any auth issue
Authentication RecipesCOMMON-CLI.mdaz login flows and token acquisition
Core Control-Plane REST APIsCOMMON-CORE.mdPagination, LRO polling, rate limiting
Gotchas & TroubleshootingCOMMON-CLI.mdaz rest audience, shell escaping, token expiry

Rules

MUST
  • Select exactly one mode from the table above before doing anything else.

  • Read references/<mode>.md end to end, as your FIRST tool call, before the first command of that mode. Read it ONCE, in a single full read: do not re-open it, do not grep it again, and do not page through it. You already have it.

  • Apply the same read-once discipline to every other file you load, including nested references/<mode>/*.md sub-references and shared common/*.md files: open only the ones you actually need, read each ONCE end to end, and never grep or re-open one you already loaded.

  • Resolve workspace and item ids by listing and filtering, never by guessing a GUID.

  • In consumption, call tools/list before the first tools/call. Continue only when ask_ontology is present; otherwise report that V1 natural-language consumption is unsupported and stop without calling another ontology tool.

  • Announce a mode switch explicitly when the request crosses a boundary.

  • Treat the reference as instructions, never as the deliverable. After reading it, RUN the documented commands against the live workspace and report the real results. Quoting what the reference says instead of executing it does not answer the request.

PREFER
  • The narrowest mode that satisfies the request.

  • Reading exactly ONE mode reference. Load a second only when the request genuinely spans modes, and say so before you do.

  • Reporting the mode you chose in your first response so the user can correct you.

AVOID
  • Acting from this dispatcher alone -- it intentionally omits the operational detail.

  • Answering with a summary of the reference instead of executing it.

  • Re-reading or re-grepping a reference you already loaded; it costs turns and tokens.

  • Mutating anything while in a read-only mode.

  • Answering an ontology data question with a hand-composed source query instead of the Ontology Agent MCP (see CRITICAL NOTE 4).

  • Loading a different skill for work this family already owns (see CRITICAL NOTES 3).

Examples

User requestModeReference to read
"Using the ClinicOperations ontology, how many clinics are there?"consumptionreferences/consumption.md
"Create a legacy V1 ontology item with Customer and Order entity types bound to the lakehouse."authoringreferences/authoring.md
"Upgrade this V1 ontology to the new V2 experience."out of scopeExplain that V2 upgrade/recreation is unavailable through this skill's authoring flow
"What entity types exist in the Sales ontology and how are they bound?"consumptionreferences/consumption.md
"Generate Eventhouse-runnable KQL for appointments per practitioner from this ontology."consumptionreferences/consumption.md

Files

references/authoring/authoring-mechanics.md

Ontology Authoring — Mechanics Reference

Deep reference for each authoring operation. SKILL.md keeps the high-level decision content (workflows, Must/Prefer/Avoid, troubleshooting). This file holds the full JSON shapes, field-by-field contracts, and verification recipes.

For base64 encode/decode across GNU vs BSD, and for the full fetch-mutate-send scripts, see definition-script-templates.md.


Definition Envelope for Ontology

The envelope is the same as any other Fabric item definition — a definition object with a parts[] array. Each part has path, payload (base64-encoded file contents), and payloadType (use InlineBase64).

Part paths must always use forward slashes (EntityTypes/{id}/definition.json), never backslashes. On Windows, avoid Join-Path or \ operators for building part paths — use string interpolation with / instead. Backslashes cause ALMOperationBadRequest.

{
  "displayName": "zava_airlines_ontology",
  "type": "Ontology",
  "definition": {
    "parts": [
      { "path": ".platform",       "payload": "<base64>", "payloadType": "InlineBase64" },
      { "path": "definition.json", "payload": "<base64>", "payloadType": "InlineBase64" }
    ]
  }
}

Shared base64 helpers (portable — the -w 0 flag is GNU-only, and -d is not on macOS's BSD base64):

# Encode — Linux / GNU coreutils
b64()   { printf '%s' "$1" | base64 -w 0; }
# Encode — macOS (BSD base64 has no -w; strip trailing newlines manually)
# b64() { printf '%s' "$1" | base64 | tr -d '\n'; }

# Decode — Linux / GNU
b64d()  { printf '%s' "$1" | base64 -d; }
# Decode — macOS (BSD base64 uses -D, not -d)
# b64d() { printf '%s' "$1" | base64 -D; }

If you need one snippet that works on both: base64 | tr -d '\n' for encode and base64 -d (GNU) / base64 -D (BSD) for decode.

See ITEM-DEFINITIONS-CORE.md § Definition Envelope for the generic pattern.


ID Generation Pattern

Entity type, relationship type, and property IDs must be positive 64-bit integers that are unique across the ontology instance. Data binding and contextualization IDs are GUIDs.

Guide the LLM to generate:

  • Entity/relationship/property IDs: random positive 15–18 digit integers (safely inside 2^62). Persist the name → id map in source control so subsequent updates reuse the same IDs.

  • Data binding / contextualization IDs: UUID v4 (uuidgen / [guid]::NewGuid()).

  • Avoid reusing an ID for a different concept — IDs are referenced by displayNamePropertyId, entityIdParts, propertyBindings[].targetPropertyId, and source/target.entityTypeId.

Preferred generators:

# Bash — 64-bit positive integer ID (requires $RANDOM or /dev/urandom)
ID=$(od -An -tu8 -N8 /dev/urandom | tr -d ' ' | head -c 18)
# Bash — GUID
GUID=$(uuidgen)
# PowerShell — 64-bit positive integer ID
$ID = [string]([System.Math]::Abs([System.BitConverter]::ToInt64([System.Security.Cryptography.RandomNumberGenerator]::GetBytes(8), 0)))
# PowerShell — GUID
$GUID = [guid]::NewGuid().ToString()

Avoid shell RANDOM — it is 15-bit on most shells and collides quickly across a handful of IDs.


Create the Ontology Item

An empty ontology is created with just .platform and an empty definition.json. Entity/relationship types are added via subsequent updateDefinition calls (preferred) or included in the initial createItem payload.

Guide the LLM to generate:

  1. A .platform JSON with { "metadata": { "type": "Ontology", "displayName": "<name>" } }.

  2. An empty definition.json of {}. The base64 encoding of {} is exactly e30= — do not add whitespace, newlines, or BOM.

  3. Base64-encode each, build the envelope, POST to https://api.fabric.microsoft.com/v1/workspaces/{WS_ID}/items.

  4. Poll https://api.fabric.microsoft.com/v1/operations/{operationId} (from the x-ms-operation-id header) until Succeeded; capture the new ontology item ID.

createItem returns 202 with no response body — az rest exits with code 0 and prints nothing. This is expected. After the LRO completes, list Ontology items in the workspace to capture the new item's ID:

ONTO_ID=$(az rest --method GET \
  --url "https://api.fabric.microsoft.com/v1/workspaces/${WS_ID}/items?type=Ontology" \
  --resource "https://api.fabric.microsoft.com" \
  --query "value[?displayName=='${ONTO_NAME}'] | [0].id" --output tsv)

To capture the LRO operation id from az rest, use --verbose and parse the x-ms-operation-id header from stderr, then poll https://api.fabric.microsoft.com/v1/operations/{operationId} — see authoring mode § LRO Header Capture. Do not poll the raw Location header (it redirects to an analysis.windows.net host and fails auth).

Minimal envelope shape:

{
  "displayName": "zava_airlines_ontology",
  "type": "Ontology",
  "definition": {
    "parts": [
      { "path": ".platform",       "payload": "<base64 of platform json>", "payloadType": "InlineBase64" },
      { "path": "definition.json", "payload": "e30=",                      "payloadType": "InlineBase64" }
    ]
  }
}

Add an Entity Type

An entity type file declares:

  • id — the 64-bit ID you generated

  • name — regex ^[a-zA-Z][a-zA-Z0-9_-]{0,127}$; the Fabric portal UI further caps custom names to 1–26 alphanumeric/hyphen/underscore characters that start and end alphanumerically, so prefer that stricter shape for portability

  • namespace — usertypes; namespaceType — Custom

  • visibility — Visible (only value documented for authoring)

  • entityIdParts — array of property IDs that form the key. Every referenced property must have valueType of String or BigInt (integer)

  • displayNamePropertyId — property ID used as the instance label

  • properties[] — non-timeseries properties (id, name, valueType)

  • timeseriesProperties[] — timeseries properties (id, name, valueType; typically includes a DateTime timestamp property)

See ONTOLOGY-AUTHORING-CORE.md § EntityType file for the complete schema and the source-column → valueType mapping table.

Example entity type file (placed at EntityTypes/{entityTypeId}/definition.json):

{
  "id": "8813598896083",
  "namespace": "usertypes",
  "namespaceType": "Custom",
  "name": "Aircraft",
  "baseEntityTypeId": null,
  "visibility": "Visible",
  "entityIdParts": [ "3117068036374594013" ],
  "displayNamePropertyId": "3117068036374594013",
  "properties": [
    { "id": "3117068036374594013", "name": "TailNumber",       "redefines": null, "baseTypeNamespaceType": null, "valueType": "String" },
    { "id": "3117068031950000331", "name": "Manufacturer", "redefines": null, "baseTypeNamespaceType": null, "valueType": "String" }
  ],
  "timeseriesProperties": [
    { "id": "3114584981368796953", "name": "PreciseTimestamp", "redefines": null, "baseTypeNamespaceType": null, "valueType": "DateTime" },
    { "id": "3114584977562679672", "name": "AltitudeFt",      "redefines": null, "baseTypeNamespaceType": null, "valueType": "Double" }
  ]
}

Guide the LLM to generate:

  • One property with valueType: String to act as both key and display name unless the user specifies otherwise.

  • Distinct IDs for each property; never reuse an ID across properties or entity types.

  • A DateTime PreciseTimestamp property in timeseriesProperties when the source is a timeseries table.

  • When altering an existing entity type, read the current definition first, mutate the properties[]/timeseriesProperties[], and resend — do not reuse the same property ID for a different field.


Bind an Entity Type to a Lakehouse or Eventhouse Table

Data binding files sit at EntityTypes/{entityTypeId}/DataBindings/{guid}.json. Two binding types:

  • NonTimeSeries (static attributes) — lakehouse only, at most one per entity type. Must be added before any time-series binding.

  • TimeSeries (streaming / historical) — lakehouse or eventhouse. An entity type may have multiple time-series bindings, across both source kinds.

Binding constraint checklist (see ONTOLOGY-AUTHORING-CORE.md § Binding rules for the full list):

  • Each entity type has at most one NonTimeSeries binding, sourced from OneLake (lakehouse only); this static binding is required before any TimeSeries binding on the same entity type.

  • Lakehouse source tables must be managed (not external), must not have OneLake security enabled, and must not have delta column mapping enabled.

  • Column mapping is auto-enabled when column names contain ,, ;, {, }, (, ), \n, \t, =, or space — rename those columns upstream before binding.

  • Entity type keys (entityIdParts) must reference properties whose valueType is String or BigInt.

Non-timeseries binding (lakehouse):

{
  "id": "66253a71-c26f-4c9d-877f-3af5632a4be2",
  "dataBindingConfiguration": {
    "dataBindingType": "NonTimeSeries",
    "propertyBindings": [
      { "sourceColumnName": "TailNumber",       "targetPropertyId": "3117068036374594013" },
      { "sourceColumnName": "Manufacturer", "targetPropertyId": "3117068031950000331" }
    ],
    "sourceTableProperties": {
      "sourceType": "LakehouseTable",
      "workspaceId": "<WS_ID>",
      "itemId": "<LH_ID>",
      "sourceTableName": "aircraft_static",
      "sourceSchema": "dbo"
    }
  }
}

Timeseries binding (lakehouse):

{
  "id": "39a3889b-77e4-4851-8960-e3b779a5d9ba",
  "dataBindingConfiguration": {
    "dataBindingType": "TimeSeries",
    "timestampColumnName": "PreciseTimestamp",
    "propertyBindings": [
      { "sourceColumnName": "PreciseTimestamp", "targetPropertyId": "3114584981368796953" },
      { "sourceColumnName": "AltitudeFt",      "targetPropertyId": "3114584977562679672" },
      { "sourceColumnName": "TailNumber",           "targetPropertyId": "3117068036374594013" }
    ],
    "sourceTableProperties": {
      "sourceType": "LakehouseTable",
      "workspaceId": "<WS_ID>",
      "itemId": "<LH_ID>",
      "sourceTableName": "zava_aircraft_timeseries",
      "sourceSchema": "dbo"
    }
  }
}

Timeseries binding (eventhouse / Kusto):

{
  "id": "d8b4e4f5-12aa-4db7-b5c3-0f8b1f2ad7c1",
  "dataBindingConfiguration": {
    "dataBindingType": "TimeSeries",
    "timestampColumnName": "PreciseTimestamp",
    "propertyBindings": [
      { "sourceColumnName": "PreciseTimestamp", "targetPropertyId": "3114584981368796953" },
      { "sourceColumnName": "AltitudeFt",      "targetPropertyId": "3114584977562679672" },
      { "sourceColumnName": "TailNumber",           "targetPropertyId": "3117068036374594013" }
    ],
    "sourceTableProperties": {
      "sourceType": "KustoTable",
      "workspaceId": "<WS_ID>",
      "itemId": "<EH_ID>",
      "clusterUri": "<eventhouse-cluster-uri>",
      "databaseName": "<kql-database-name>",
      "sourceTableName": "zava_aircraft_timeseries"
    }
  }
}

Guide the LLM to generate:

  • One propertyBindings entry per property the user wants populated, keyed on the correct targetPropertyId.

  • workspaceId / itemId filled from resolved variables — never hardcoded GUIDs.

  • sourceSchema = dbo for lakehouse tables unless the user specifies a schema.

  • A fresh GUID per binding — never reuse a GUID across bindings.

  • Eventhouse bindings: ask for the clusterUri and databaseName from the target KQL database item before composing; never infer these.


Add a Relationship Type

A relationship type connects two existing and distinct entity types. File path: RelationshipTypes/{relTypeId}/definition.json.

{
  "id": "3110733855942077719",
  "namespace": "usertypes",
  "namespaceType": "Custom",
  "name": "operates",
  "source": { "entityTypeId": "<hub_entity_type_id>" },
  "target": { "entityTypeId": "<aircraft_entity_type_id>" }
}

Guide the LLM to generate:

  • name that matches ^[a-zA-Z][a-zA-Z0-9_-]{0,127}$.

  • source.entityTypeId and target.entityTypeId that reference entity types already present in the ontology parts list — and are distinct from each other.

  • A new relationship type ID, unique across the ontology.


Bind a Relationship Contextualization

A contextualization tells the ontology how rows in a lakehouse table map to relationship instances. File path: RelationshipTypes/{relTypeId}/Contextualizations/{guid}.json.

{
  "id": "62bbbf52-39a4-47ed-b7bf-651debaca6ab",
  "dataBindingTable": {
    "sourceType": "LakehouseTable",
    "workspaceId": "<WS_ID>",
    "itemId": "<LH_ID>",
    "sourceTableName": "zava_hub_aircraft_link",
    "sourceSchema": "dbo"
  },
  "sourceKeyRefBindings": [
    { "sourceColumnName": "HubId", "targetPropertyId": "<hub_key_property_id>" }
  ],
  "targetKeyRefBindings": [
    { "sourceColumnName": "TailNumber", "targetPropertyId": "<aircraft_key_property_id>" }
  ]
}

Guide the LLM to generate:

  • sourceKeyRefBindings with each targetPropertyId referencing a property in the source entity type's entityIdParts.

  • targetKeyRefBindings with each targetPropertyId referencing a property in the target entity type's entityIdParts.

  • A link table that actually contains both key columns (the user should confirm). Common mistake: pointing at a table that only contains one side's key.


Apply a Definition Update

updateDefinition replaces the included parts wholesale. The safe workflow is fetch → mutate → send.

getDefinition typically returns 202 (LRO), not 200 with inline data. You must:

  1. Capture the x-ms-operation-id header from the 202 response

  2. Poll https://api.fabric.microsoft.com/v1/operations/{operationId} until status: "Succeeded"

  3. GET https://api.fabric.microsoft.com/v1/operations/{operationId}/result to retrieve the actual definition envelope

Poll the Fabric operations endpoint on api.fabric.microsoft.com rather than following the raw Location header — the latter redirects to an analysis.windows.net host that fails az rest --resource https://api.fabric.microsoft.com auth. This pattern applies to both az rest (capture via --verbose) and curl (capture via -D headers file). See definition-script-templates.md for complete scripts that handle both 200 and 202.

# 1. Fetch current definition. getDefinition is LRO-capable: it MAY return 200
#    with the envelope inline, OR 202 with a Location header (operation URL).
#    The explicit '{}' body avoids HTTP 411 Length Required on empty POSTs.
#    For the 202 path (poll Location → GET {Location}/result), use the complete
#    script in definition-script-templates.md.
az rest --method POST \
  --url "https://api.fabric.microsoft.com/v1/workspaces/${WS_ID}/items/${ONTO_ID}/getDefinition" \
  --resource "https://api.fabric.microsoft.com" \
  --headers "Content-Type=application/json" \
  --body '{}' \
  -o json > /tmp/onto_current.json

# 2. Mutate locally (script: decode base64 parts, patch JSON, re-encode)

# 3. Send the updated envelope (also LRO — poll the Location header)
az rest --method POST \
  --url "https://api.fabric.microsoft.com/v1/workspaces/${WS_ID}/items/${ONTO_ID}/updateDefinition" \
  --resource "https://api.fabric.microsoft.com" \
  --headers "Content-Type=application/json" \
  --body @/tmp/onto_new_envelope.json

Both createItem and updateDefinition return long-running operations. getDefinition is also LRO-capable — it may return the envelope directly (200 OK) or a 202 Accepted carrying an x-ms-operation-id header; in the 202 case, poll https://api.fabric.microsoft.com/v1/operations/{operationId} until Succeeded and then GET …/operations/{operationId}/result to retrieve the envelope. Poll the Fabric operations endpoint, not the raw Location header (which redirects to an analysis.windows.net host and fails auth). See COMMON-CLI.md § Long-Running Operations (LRO) Pattern and the fetch-mutate-send script in definition-script-templates.md, which handles both cases.

When renaming the ontology, add the updateMetadata=true query string to updateDefinition and include an updated .platform part. See ONTOLOGY-AUTHORING-CORE.md § Item-management contract.


Verify and Inspect

After any authoring operation, re-fetch the definition and decode the parts you changed.

# Use '{}' body (POST with empty body can return 411 Length Required). If this
# returns 202, fall back to the LRO-aware script in definition-script-templates.md.
az rest --method POST \
  --url "https://api.fabric.microsoft.com/v1/workspaces/${WS_ID}/items/${ONTO_ID}/getDefinition" \
  --resource "https://api.fabric.microsoft.com" \
  --headers "Content-Type=application/json" \
  --body '{}' \
  | jq -r '.definition.parts[] | select(.path | test("EntityTypes/.+/definition.json$")) | .payload' \
  | while read p; do echo "---"; echo "$p" | base64 -d | jq .; done

Additional sanity checks the LLM should run:

  • Every targetPropertyId in any binding exists in the parent entity type's properties[] or timeseriesProperties[].

  • Every entityIdParts[] and displayNamePropertyId points at an existing property in the same entity type.

  • Every relationship source.entityTypeId / target.entityTypeId references an entity type present in the parts list and the two are distinct.

  • Every binding's workspaceId / itemId resolves to an existing source item: a lakehouse for LakehouseTable sources (static + timeseries), or an Eventhouse for KustoTable sources (timeseries only). For KustoTable, also verify clusterUri matches the KQL database's properties.queryServiceUri and databaseName matches its displayName.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/skills-for-fabric · skills/ontology-cli · commit f8fac11
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
microsoft/skills-for-fabric

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download ontology-cli.zip