feat(ossie/ai): ontology endpoint + describe_ossie_ontology MCP tool (#1410) - #1416
Merged
Conversation
…1410) Exposes the OSI ontology block through the AI Query API + the MCP surface. Consumes the OntologyEntry / OntologyConcept / OntologyRelationship / OntologyRole DTOs published from bi.saiku.ossie:ossie-core:0.1.0-SNAPSHOT (spiculedata/ossie#5). ## What's new ### REST endpoint GET /rest/saiku/api/ai/ossie/ontology/{connection}/{model} Returns: - {"connection": "...", "model": "...", "ontology": [OntologyEntry]} - Empty list when the underlying document has no ontology block - Same validation shape as /schema — unknown connection returns VALIDATION_ERROR with candidate list ### MCP tool - describe_ossie_ontology, same operand schema as describe_ossie_model (connection + model). Wraps the REST endpoint via AiOssieResource.getOntology. - Only advertised in tools/list when AiOssieResource is wired (matches existing Ossie-tool gating pattern). ### OssieDiscoverService - New public getOntology(connectionName) returning List<OntologyEntry> - Refactored: extracted a package-private readDocument helper so getModel + getOntology share connection-validation + YAML-read code paths. Zero behavioural change on getModel. ## Tests - McpResourceTest: +2 cases (ontology tool advertised on tools/list when Ossie is wired, describe_ossie_ontology dispatches to getOntology on the resource). 14/14 total. - Full saiku-service + saiku-web reactor: green. ## Docs docs/AI-OSSIE-API.md gains a new "Step 4b — inspect the ontology block" section between validation and preview. Table of MCP tools updated to 6. Closes saiku#1410. Ontology-block DTOs are pure passthrough; consumers that want to reason over the graph (subsumption, transitive closure, concept-based navigation) build on top.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes the OSI ontology block through the AI Query API + the MCP
surface. Consumes the OntologyEntry / OntologyConcept /
OntologyRelationship / OntologyRole DTOs published from
bi.saiku.ossie:ossie-core:0.1.0-SNAPSHOT (spiculedata/ossie#5).
What's new
REST endpoint
Returns:
VALIDATION_ERROR with candidate list
MCP tool
(connection + model). Wraps the REST endpoint via
AiOssieResource.getOntology.
(matches existing Ossie-tool gating pattern).
OssieDiscoverService
getModel + getOntology share connection-validation + YAML-read code
paths. Zero behavioural change on getModel.
Tests
when Ossie is wired, describe_ossie_ontology dispatches to
getOntology on the resource). 14/14 total.
Docs
docs/AI-OSSIE-API.md gains a new "Step 4b — inspect the ontology
block" section between validation and preview. Table of MCP tools
updated to 6.
Closes saiku#1410. Ontology-block DTOs are pure passthrough; consumers
that want to reason over the graph (subsumption, transitive closure,
concept-based navigation) build on top.