Package ai.chatur.cortex.spring.ontology
Class OntologyResources
java.lang.Object
ai.chatur.cortex.spring.ontology.OntologyResources
MCP resource serving the ontology at
cortex://ontology, so AI agents can ground the
assertions they produce in the vocabulary of the knowledge graph.-
Constructor Summary
ConstructorsConstructorDescriptionOntologyResources(ai.chatur.cortex.CortexOntology cortex) Creates the resource. -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.spec.McpSchema.ReadResourceResultgetOntology(org.springframework.ai.mcp.annotation.McpMeta meta) Returns the ontology in Turtle syntax as an MCP resource.
-
Constructor Details
-
OntologyResources
public OntologyResources(ai.chatur.cortex.CortexOntology cortex) Creates the resource.- Parameters:
cortex- the ontology role used to render the ontology
-
-
Method Details
-
getOntology
@McpResource(uri="cortex://ontology", name="Ontology", description="Access Cortex Ontology in Turtle format") public io.modelcontextprotocol.spec.McpSchema.ReadResourceResult getOntology(org.springframework.ai.mcp.annotation.McpMeta meta) Returns the ontology in Turtle syntax as an MCP resource.- Parameters:
meta- MCP request metadata, unused- Returns:
- the ontology resource contents, serialized in Turtle syntax
-