Class OntologyResources

java.lang.Object
ai.chatur.cortex.spring.ontology.OntologyResources

public class OntologyResources extends Object
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

    Constructors
    Constructor
    Description
    OntologyResources(ai.chatur.cortex.CortexOntology cortex)
    Creates the resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.modelcontextprotocol.spec.McpSchema.ReadResourceResult
    getOntology(org.springframework.ai.mcp.annotation.McpMeta meta)
    Returns the ontology in Turtle syntax as an MCP resource.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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