Ontology CLI
MicrosoftOfficialPublished by Microsoft
- Skill
- Tool integration
- Data and AI
- MIT
- No issues found
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
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/ontology-cli/downloadUnzip 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.comcall must carryx-ms-fabric-skill: ontology-cli(az rest:--headers "x-ms-fabric-skill=ontology-cli"), including every LRO poll,fabric_lroand retry. Snippets omit it — add it anyway.
CRITICAL NOTES
To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
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
Skill disambiguation: use
ontology-clifor operations on an Ontology item and questions grounded in that Ontology. Natural-language data questions over existing Power BI reports/models arefabriciq; report creation, editing, publishing, or rebinding ispowerbi-report-cli; semantic-model or DAX authoring issemantic-model-authoring. Naming an Ontology as a report's data source does not move report authoring into this skill.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.Natural-language consumption supports only new-experience (V2) Ontologies. Call
tools/listfirst. Ifask_ontologyis 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 tosearch_ontology.Authoring is legacy V1-only. The JSON
EntityTypes/.../definition.jsonitem-definition flow below cannot create, convert, or upgrade a new-experience (V2) Ontology. Do not route a V2 upgrade/recreation request intoauthoring.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
| Mode | Use when the request ... | Example triggers | Read this first |
|---|---|---|---|
authoring | creates or updates a legacy V1 Ontology's JSON entity/relationship definitions or data bindings; V2 creation/upgrade is out of scope | create legacy ontology item, bind V1 entity type, add V1 relationship type, update legacy ontology definition | references/authoring.md |
consumption | asks a question about an existing new-experience (V2) Ontology -- its data, entities, or rules -- or wants grounded runnable code generated from it | how many clinics are there, which treatment rooms are busiest, what entities exist, list the ontology rules, generate KQL from this ontology | references/consumption.md |
Consumption sub-references (read directly, not through chained links):
references/consumption/examples.md: verified calls, worked examples and troubleshooting.
references/consumption/request-files.md: read before preparing a PowerShell MCP request; absolute payload paths and local JSON validation.
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.
| Mode | Terminal write |
|---|---|
authoring | createItem (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. |
consumption | none -- 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.
| Task | Reference | Notes |
|---|---|---|
| Finding Workspaces and Items in Fabric | COMMON-CLI.md | Mandatory -- read before resolving any workspace or item id |
| Catalog Search | COMMON-CORE.md | Request/response shape, Catalog.Read.All scope, 24 h indexing delay |
| Pagination Pattern | COMMON-CLI.md | Catalog Search and item listings both page via continuationToken |
| Fabric Topology & Key Concepts | COMMON-CORE.md | Item types, workspaces, capacities |
| Environment URLs | COMMON-CORE.md | Sovereign / non-public cloud hosts |
| Authentication & Token Acquisition | COMMON-CORE.md | Wrong audience = 401; read before any auth issue |
| Authentication Recipes | COMMON-CLI.md | az login flows and token acquisition |
| Core Control-Plane REST APIs | COMMON-CORE.md | Pagination, LRO polling, rate limiting |
| Gotchas & Troubleshooting | COMMON-CLI.md | az rest audience, shell escaping, token expiry |
Rules
MUST
Select exactly one mode from the table above before doing anything else.
Read
references/<mode>.mdend 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>/*.mdsub-references and sharedcommon/*.mdfiles: 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, calltools/listbefore the firsttools/call. Continue only whenask_ontologyis 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 request | Mode | Reference to read |
|---|---|---|
| "Using the ClinicOperations ontology, how many clinics are there?" | consumption | references/consumption.md |
| "Create a legacy V1 ontology item with Customer and Order entity types bound to the lakehouse." | authoring | references/authoring.md |
| "Upgrade this V1 ontology to the new V2 experience." | out of scope | Explain 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?" | consumption | references/consumption.md |
| "Generate Eventhouse-runnable KQL for appointments per practitioner from this ontology." | consumption | references/consumption.md |
Files
- ATTRIBUTION.mdAdded by AutoGineer869 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md9.9 KiB
- apm.yml393 B
- references/authoring.md47.3 KiB
- references/authoring/ONTOLOGY-AUTHORING-CORE.md17.7 KiB
- references/authoring/authoring-mechanics.md17.9 KiB
- references/authoring/definition-script-templates.md12.5 KiB
- references/authoring/examples.md9.8 KiB
- references/authoring/preview-and-confirm.md14.0 KiB
- references/consumption.md18.9 KiB
- references/consumption/examples.md18.6 KiB
- references/consumption/request-files.md1.3 KiB
references/consumption/examples.md
<!-- Sub-reference for the `ontology-cli` skill, `consumption` mode. Indexed directly from `skills/ontology-cli/SKILL.md`. -->
ontology-cli consumption — Verified calls and troubleshooting
Verified Ontology Agent MCP calls and troubleshooting. Selection rules live in the
consumption mode reference indexed from SKILL.md.
Contents
| Section | Covers |
|---|---|
| Call template | The shape every example below reuses |
| Verbatim JSON replies | A machine-checked reply draft that preserves opaque identifiers |
| 0. Resolve the IDs | Workspace-scoped listing or Catalog Search |
| 1. Discover the surface | tools/list and reading the result |
| 2. Ask a business question | The core ask_ontology call |
| 3. Ask for runnable code | queryLanguage plus execution target |
| 4. An unsupported V1 ontology | Stop before tools/call and request upgrade |
| 5. Inspect the schema | list_ontology_entities, filtered |
| Troubleshooting | Verified symptoms and fixes |
Call template
WS and ONT are resolved workspace/item GUIDs, never guesses. Resolve within the named
workspace; use Catalog Search only when none was supplied (see 0. Resolve the IDs).
APIHOST is https://api.fabric.microsoft.com. Use a body file: inline questions break shell quoting.
az rest --method post \
--url "$APIHOST/v1/mcp/dataPlane/workspaces/$WS/items/$ONT/ontologyEndpoint" \
--resource "https://api.fabric.microsoft.com" \
--headers "Content-Type=application/json" "Accept=application/json, text/event-stream" \
"x-ms-fabric-skill=ontology-cli" \
--body "@/tmp/payload.json" 1>ont_resp.json 2>ont_err.txt
cat ont_resp.jsonThe --resource audience is https://api.fabric.microsoft.com.
Allow at least 120 seconds per ask_ontology call.
PowerShell: prepare an absolute UTF-8-without-BOM payload and validate it locally
before POST, following consumption/request-files.md, indexed in SKILL.md. Pass the same
quoted "@$payloadPath" to the CLI; recreate variables in fresh shells.
Do not call the variable
HOST. In PowerShell$hostis a reserved automatic variable, the assignment fails, and the call has to be re-issued -- which bills the agent twice.
Capturing the answer without paying twice
Each tools/call is billed. Save the complete first response with 1> and read it
in the same command. Never call once for --query result.isError and again for content:
Keep $payloadPath pointing to the actual request you prepared. In a fresh shell,
recreate that request's absolute path; do not replace it with a discovery filename.
# correct -- the answer is on disk before anything tries to display it
$null = Get-Content -LiteralPath $payloadPath -Raw -ErrorAction Stop |
ConvertFrom-Json -ErrorAction Stop
az rest --method post --url "$APIHOST/v1/mcp/dataPlane/workspaces/$WS/items/$ONT/ontologyEndpoint" `
--resource "https://api.fabric.microsoft.com" `
--headers "Content-Type=application/json" "Accept=application/json, text/event-stream" `
"x-ms-fabric-skill=ontology-cli" `
--body "@$payloadPath" 1>ont_resp.json 2>ont_err.txt
function ConvertFrom-McpResponseText([string]$text) {
try {
$json = $text | ConvertFrom-Json -ErrorAction Stop
if ($null -ne $json.id -and ($json.PSObject.Properties['result'] -or $json.PSObject.Properties['error'])) {
return $json
}
} catch {}
$events = [regex]::Split($text.Trim(), '\r?\n\r?\n')
for ($i = $events.Count - 1; $i -ge 0; $i--) {
$data = @(($events[$i] -split '\r?\n') |
Where-Object { $_ -match '^data:' } |
ForEach-Object { $_ -replace '^data:\s?', '' }) -join "`n"
if ($data -and $data -ne '[DONE]') {
try {
$json = $data | ConvertFrom-Json -ErrorAction Stop
if ($null -ne $json.id -and ($json.PSObject.Properties['result'] -or $json.PSObject.Properties['error'])) {
return $json
}
} catch {}
}
}
throw 'Ontology MCP response contained neither JSON nor a valid SSE data frame.'
}
$j = ConvertFrom-McpResponseText (Get-Content ont_resp.json -Raw)
if ($j.PSObject.Properties['error']) {
throw ("Ontology MCP JSON-RPC error: " + ($j.error | ConvertTo-Json -Depth 30 -Compress))
}
"isError=" + $j.result.isError
$j.result.content | Where-Object type -eq 'text' | ForEach-Object textDo not capture stdout into $resp, guard on it being empty, then write it:
a wrapper can lose stdout after a successful slow call. Redirect to disk first.
Recover display or projections from that file; never re-send the body.
For PowerShell-native HTTP, use Invoke-WebRequest so either JSON or SSE remains raw text; do not
redirect an Invoke-RestMethod object through the table formatter:
$headers.Accept = 'application/json, text/event-stream'
$response = Invoke-WebRequest -Method Post -Uri $uri -Headers $headers -Body $body
$response.Content | Set-Content response.txt
$j = ConvertFrom-McpResponseText $response.ContentVerbatim JSON replies
For an explicit raw-schema request, do not reconstruct JSON or shorten identifiers
while composing the answer. In the same PowerShell invocation that parses the saved
response into $j, construct and check the exact reply draft:
function Get-VerifiedOntologyReply([string]$serviceText, [string]$draftPath) {
if ([string]::IsNullOrWhiteSpace($serviceText)) { throw 'Saved Ontology response has no text to deliver.' }
$draft = Get-Content -LiteralPath $draftPath -Raw -Encoding UTF8 -ErrorAction Stop
if (-not $draft.Contains($serviceText)) {
throw 'Reply draft changed the service text. Rebuild it from the saved response and recheck.'
}
return $draft
}
$serviceText = @($j.result.content | Where-Object type -eq 'text' | ForEach-Object text) -join "`n"
$draftPath = Join-Path ([IO.Path]::GetTempPath()) ('ontology-answer-' + [guid]::NewGuid().ToString('N') + '.md')
$fence = '```'
$draft = "isError=$($j.result.isError)`n`n$fence" + "json`n$serviceText`n$fence"
try {
[IO.File]::WriteAllText($draftPath, $draft, [Text.UTF8Encoding]::new($false))
Get-VerifiedOntologyReply -serviceText $serviceText -draftPath $draftPath
} finally {
if (Test-Path -LiteralPath $draftPath) { Remove-Item -LiteralPath $draftPath -ErrorAction Stop }
}Use that checked draft unchanged for the final chat response. Do not retype its
JSON or identifiers after checking. Recheck any edited draft; if it fails, recover
the text from the saved response, never by issuing another tools/call. In a new
PowerShell invocation, redefine the helpers and reparse the saved response first.
Do not silently switch to file-only delivery when the user requested the content
in chat.
0. Resolve the IDs
Choose the path that preserves the user's scope:
Workspace supplied: resolve that workspace, then list its Ontology items with
GET {host}/v1/workspaces/{WS}/items?type=Ontologyand exact-filter the name or ID locally. Do not broaden to tenant-wide Catalog Search.No workspace supplied: use Catalog Search. Every hit carries
hierarchy.workspace.idbesideid, so one result provides both halves of the MCP URL. This path requires theCatalog.Read.Alldelegated scope.
Inside a supplied workspace — exact-filter the item locally:
az rest --method get \
--url "$APIHOST/v1/workspaces/$WS/items?type=Ontology" \
--resource "https://api.fabric.microsoft.com" \
--headers "x-ms-fabric-skill=ontology-cli" \
--query "value[?displayName=='ClinicNetwork'].{name:displayName,id:id}" -o tableWith no workspace supplied, by name — the user said "the ClinicNetwork ontology":
cat > /tmp/find.json << 'EOF'
{"search": "ClinicNetwork", "filter": "Type eq 'Ontology'", "pageSize": 30}
EOF
az rest --method post --url "$APIHOST/v1/catalog/search" \
--resource "https://api.fabric.microsoft.com" \
--headers "x-ms-fabric-skill=ontology-cli" \
--body @/tmp/find.json \
--query "value[].{name:displayName, id:id, ws:hierarchy.workspace.id}" -o tableBy bare GUID — drop search entirely and match id yourself. Do not pass the GUID as
search; verified on a live tenant, that returns the derived <name>_lh_<guid> and
<name>_graph_<guid> artefacts plus unrelated noise, and not the ontology:
cat > /tmp/all.json << 'EOF'
{"filter": "Type eq 'Ontology'", "pageSize": 100}
EOF
az rest --method post --url "$APIHOST/v1/catalog/search" \
--resource "https://api.fabric.microsoft.com" \
--headers "x-ms-fabric-skill=ontology-cli" \
--body @/tmp/all.json \
--query "value[?id=='$ONT'].hierarchy.workspace.id | [0]" -o tsvIf the result is empty and continuationToken is non-empty, repeat with that token before
concluding the ontology is absent — but cap the walk at three pages and then ask for the
workspace instead.
Verified search behaviour
search matches case-insensitive word prefixes across name and description — it is neither
an exact match nor typo-tolerant. The behaviour below was measured on a live tenant; the names
are illustrative, standing in for two ontologies called ClinicNetwork and ClinicOperations:
| Query | Hits | Why it matters |
|---|---|---|
Clinic, clinic, CLINIC | 2 | case-insensitive |
Clin, Cli | 2 | a prefix is enough — the user need not type the full name |
nic | 0 | prefix, not substring |
Operati | 4 | camel-case names are tokenised |
Clinnic | 0 | no fuzzy matching; a typo finds nothing |
Operations | 6 | matched half the tenant, several only via description |
radiology | 1 | description-only match |
So more than one hit is the normal case. Show displayName, workspace and id, and let the
user choose; picking the first silently will eventually answer from the wrong ontology.
1. Discover the surface
cat > /tmp/payload.json <<'JSON'
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
JSONAdd --query "result.tools[].name" to the template to see just the names:
["search_ontology", "ask_ontology", "list_ontology_rules", "list_ontology_entities"]ask_ontology is present, so this is a supported new-experience (V2) Ontology and the rest of the
session may use it. If ask_ontology is absent, stop before tools/call.
2. Ask a business question
User: "Using the ClinicOperations ontology, how many clinics are there?"
cat > /tmp/payload.json <<'JSON'
{"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"ask_ontology","arguments":{"request":"How many clinics are there?"}}}
JSONResponse:
{ "jsonrpc": "2.0", "id": 2,
"result": {
"_meta": { "conversationId": "8b319d38-6472-4bd8-8351-80959687c0d3" },
"content": [ { "type": "text", "text": "There are **5 clinics**." } ],
"isError": false } }Answer to the user: There are 5 clinics in the ClinicOperations ontology.
Note what is not here: no definition fetch, no base64 decode, no hand-written SQL, no delegation to a sibling skill. One discovery call and one question.
3. Ask for runnable code
queryLanguage accepts KQL, SQL, DAX, Python, the ontology DSL, or Ontology/Eventhouse-runnable
KQL that joins KQL, SQL and DAX sources. Name it and the execution target inside request:
{"jsonrpc":"2.0","id":3,"method":"tools/call",
"params":{"name":"ask_ontology","arguments":{"request":
"Generate runnable code that returns the number of appointments per practitioner. queryLanguage: KQL. Execution target: Eventhouse."}}}The returned text is KQL grounded in the ontology's real bindings — a concrete connection string
and real table and column names, not placeholders. Present it to the user; hand execution to
eventhouse-cli only if they ask for it. This call is slower than a plain question.
4. An unsupported V1 ontology
When tools/list omits ask_ontology — for example, it returns only
["list_ontology_entity_types", "search_ontology"] — stop before tools/call. Do not use
search_ontology as a fallback.
Tell the user:
Natural-language queries in
ontology-clisupport only new-experience (V2) Ontologies. This Ontology uses the earlier V1 experience, so I did not run the query. Upgrade or recreate it in the new Ontology experience, then try again.
5. Inspect the schema
Only when the user actually asked a schema question. Filter whenever you can — the unfiltered form returned roughly 44,000 characters for a 13-entity ontology.
{"jsonrpc":"2.0","id":5,"method":"tools/call",
"params":{"name":"list_ontology_entities","arguments":{"entityName":"Appointment"}}}result.content[0].text parses to:
{ "values": [ { "name": "Appointment", "lineageTag": "...", "keyProperties": [ ... ],
"backingTable": { ... }, "additionalBackingTables": [ ... ],
"properties": [ ... ], "synonyms": [ ... ], "annotations": [ ... ],
"resourceLinks": [ ... ] } ] }6. A follow-up question
Every tools/call is independent -- the server keeps no conversation, so a follow-up that
relies on the previous turn will be answered without that context. Fold the carried-over facts
into the new request:
| The user says | Send |
|---|---|
| "Of those 5, which is busiest?" | "Among the 5 clinics in this ontology, which one records the most appointments?" |
| "Now break that down by month" | "Break the 47 cancelled appointments in this ontology down by month." |
Keep result._meta.conversationId in your notes; it identifies the call in a support ticket even
though it cannot be replayed.
Version gating, as observed
tools/list against two ontologies in the same workspace returns different sets:
V2 ontology -> search_ontology, ask_ontology, list_ontology_rules, list_ontology_entities
V1 ontology -> list_ontology_entity_types, search_ontologyOnly the first surface is supported for natural-language consumption. The V1 list is shown solely
so the client can recognize and reject it; do not call search_ontology.
Calling a gated tool anyway returns HTTP 200 carrying:
{ "result": { "content": [{ "type": "text",
"text": "Tool 'ask_ontology' is not supported for this ontology artifact version." }],
"isError": true } }Phrasing the request
request is the only input, so the whole question has to live in that one string.
| User said | Weak request | Strong request |
|---|---|---|
| "how many clinics" | clinics | How many clinics are there? |
| "cancellations last month" | cancellations | How many appointments were cancelled during the previous calendar month, broken down by clinic, highest first? |
| "busiest rooms" | rooms | Which treatment rooms handled the most appointments? Return room, site and appointment count. |
| "departments per site" | departments by site | For each site, return the site ID, the site name and the number of departments. |
The last row matters more than it looks: site names repeat, so a request that groups by name merges distinct sites into one row. Ask for the identifier whenever the question says "for each".
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Catalog Search by GUID returns <name>_lh_<guid> / <name>_graph_<guid> but not the ontology | The GUID was passed as search, which matches names, not IDs | Drop search, filter on Type eq 'Ontology', and compare id locally |
| Catalog Search returns nothing for an ontology you know exists | Wrong tenant or identity, wrong host, missing access, or (rarely) the 24 h indexing lag | Check az account show against the tenant that owns the item before scanning wider; a bigger scan cannot fix an identity or environment mismatch |
| The bare-GUID scan keeps paging and never matches | filter-only walks every ontology in the tenant; large tenants run to hundreds | Stop after ~3 pages per host and ask for the workspace ID. Do not switch to workspace enumeration — it is more expensive, not less |
| Catalog Search returns many unrelated ontologies | search also matches the description, so common words are broad | Narrow the term, or show the hits and ask the user which one |
result.isError: true, text Tool 'ask_ontology' is not supported for this ontology artifact version. | The ontology is V1 (feature level 1) | Stop; explain that only new-experience (V2) Ontologies support natural-language consumption and request upgrade/recreation |
tools/list omits ask_ontology | The item is V1 or otherwise not on the supported new experience | Stop before tools/call; do not fall back to search_ontology |
HTTP 404 with The entity could not be found | The route resolved but the workspace or ontology ID is wrong for this host, or you lack access | Re-resolve both IDs within the original requested scope on the same host; check item access |
HTTP 404 with The requested resource could not be found | A legacy route alias was used, or the host does not match the environment | Use /v1/mcp/dataPlane/workspaces/{ws}/items/{id}/ontologyEndpoint, and confirm the host matches the environment the IDs came from |
| HTTP 401 | Not signed in, or wrong token audience | az login; confirm --resource "https://api.fabric.microsoft.com" |
| Service-principal token fails | Ontology MCP currently does not support service principals | Sign in interactively with az login; do not retry the service-principal token |
| HTTP 403 | The signed-in identity lacks read access to the ontology item | Ask for a role assignment on the item or the workspace |
JSON-RPC error instead of result | Bad tool name, missing required argument, or a request outside 3-10000 characters | Re-read tools/list for the exact name and schema, then fix the argument |
| Shell reports an unterminated string, or the body arrives mangled | Inline --body with a quoted question | Write the payload to a file and use --body @file.json |
| The call hangs, then the client gives up | Normal agent latency exceeded the client timeout | Raise the timeout to 120 s or more. Do not retry blindly — narrow the question instead |
| The answer says an entity or property was not found | The wording did not resolve against the ontology model | Call the schema tool once, show the user the real entity names, and re-ask with corrected vocabulary |
| A schema tool response looks like an opaque string | The JSON payload is nested inside content[0].text | Parse content[0].text as JSON, then read values[] |
| The answer is vague or averages across everything | The request omitted scope, filters or a time range | Re-ask with one focused question that names the entity, the filter and the period |
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