{"ok":true,"site":{"host":"thhanke.github.io","url":"https://thhanke.github.io/ontosphere/","type":"live","desc":"Build beautiful knowledge graphs with ontologies - A modern, lightweight web application for semantic data visualization","tools":[{"name":"loadRdf","kind":"act","impl":"imperative","description":"Load ABox instance data — subjects appear as canvas nodes. Use for individual/data triples. To load a schema or ontology without adding canvas nodes, use loadOntology instead. OWL RESTRICTIONS: loadRdf is the simplest way to assert axioms with blank nodes — all triples created atomically. Prefixes ex: owl: rdf: rdfs: xsd: are pre-loaded — do NOT include @prefix lines for them. Pattern (no @prefix needed): `ex:SalamiPizza owl:equivalentClass [ a owl:Restriction ; owl:onProperty ex:hasPart ; owl:someValuesFrom ex:SalamiTopping ] .` Alternatively use addTriple with blank-node labels (see addTriple description). The blank-node restriction individual appears in the TBox canvas view after loading.","inputSchema":{"type":"object","properties":{"url":{"type":"string"},"turtle":{"type":"string"}},"oneOf":[{"required":["url"]},{"required":["turtle"]}]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"loadOntology","kind":"act","impl":"imperative","description":"Discover or load well-known ontologies — three modes in one tool. (1) Load: pass url with a prefix name (e.g. \"ical\", \"mo\", \"bot\", \"gr\") or a namespace/file URL — loads the TBox, does NOT add canvas nodes. (2) Search: pass query with a use-case keyword (\"calendar\", \"music\", \"building\", \"e-commerce\", \"spatial\", \"IoT\") — returns matching entries with prefix/description/loadUrl without loading. (3) List all: pass neither — returns all ~55 registered ontologies. If url does not match a known prefix or URL, load fails and suggestions are returned automatically. OWL/RDFS/RDF/XSD are always pre-loaded.","inputSchema":{"type":"object","properties":{"url":{"type":"string","description":"Prefix name (e.g. \"ical\", \"mo\") or full URL to load. Omit to search or list all ontologies."},"query":{"type":"string","description":"Use-case keyword to search the registry (e.g. \"calendar\", \"building\", \"IoT\"). Returns matching ontologies without loading."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"suggestOntologiesForTask","kind":"act","impl":"imperative","description":"Suggest compatible sets of ontologies for a plain-language task description. Pass task as a phrase (\"people I know\", \"mind map\", \"track sensor readings\", \"build a knowledge graph\"). Returns matching packs — each with prefix list and rationale — so you can load them via loadOntology. Pass empty string or omit task to browse all 10 available packs.","inputSchema":{"type":"object","properties":{"task":{"type":"string","description":"Plain-language description of the knowledge graph task."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"queryGraph","kind":"answer","impl":"imperative","description":"Run a SPARQL query or update against the RDF store. Workspace namespace prefixes are injected automatically so you can use short prefix:local notation. Asserted data is in urn:vg:data; inferred triples (after runReasoning) are in urn:vg:inferred — plain BGP patterns match both. Supported forms: SELECT (returns {rows, total, truncated}), CONSTRUCT (returns {triples, total, truncated}), INSERT DATA, DELETE DATA, DELETE WHERE, DELETE…INSERT…WHERE (returns {updated:true}). Results are capped at limit (default 200, max 1000); truncated:true means more rows exist — use SPARQL OFFSET for pagination. For DL reasoning (Konclude) use runReasoning instead.","inputSchema":{"type":"object","required":["sparql"],"properties":{"sparql":{"type":"string","description":"SPARQL query or update. Prefix notation supported (e.g. ex:Alice, owl:Class)."},"limit":{"type":"integer","default":200,"description":"Max rows/triples returned (default 200, max 1000). Ignored for UPDATE queries. Check truncated:true in response for more results; use SPARQL OFFSET to paginate."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"exportGraph","kind":"act","impl":"imperative","description":"Export the current RDF graph. turtle | jsonld | rdfxml flatten the store into a single default graph (named-graph structure is lost). nquads | trig are dataset-faithful: they collect quads from every urn:vg:* graph (data, inferred, shapes, ontologies, workflows) and preserve each graph IRI, so the multi-graph partition round-trips on re-import.","inputSchema":{"type":"object","properties":{"format":{"type":"string","enum":["turtle","jsonld","rdfxml","nquads","trig"]}},"required":["format"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"canonicalizeGraph","kind":"answer","impl":"imperative","description":"Produce the W3C RDFC-1.0 canonical N-Quads form + a content hash of the graph — for reproducible snapshots, deterministic diffing, and standards-compliant dataset identity. RDFC-1.0 (W3C Recommendation, 2024) assigns deterministic blank-node labels, so two graphs that are ISOMORPHIC (identical up to blank-node relabelling and triple order) produce a byte-identical canonical form and the SAME hash — a stable, content-addressable dataset identity. Returns { canonical, hash, quadCount }. Pass graph to canonicalize one named graph (e.g. \"urn:vg:data\"), or omit it for the whole dataset; pass includeInferred=true to fold urn:vg:inferred into the form. Read-only: never mutates the graph.","inputSchema":{"type":"object","properties":{"graph":{"type":"string","description":"Single named graph to canonicalize (e.g. \"urn:vg:data\", \"urn:vg:ontologies\"). Omit for the whole dataset."},"includeInferred":{"type":"boolean","default":false,"description":"Fold the urn:vg:inferred graph into the canonical form when no specific graph is requested (default false)."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"exportImage","kind":"act","impl":"imperative","description":"Export the canvas diagram as SVG text (default, token-efficient) or PNG data URI. Full canvas: call fitCanvas first, then exportImage. Focused view: pass focusIri — the export viewBox tightly frames that node and all its direct canvas neighbours (ideal for per-individual snapshots). Use SVG format in demo scripts — it scales cleanly at any resolution and is token-efficient.","inputSchema":{"type":"object","properties":{"format":{"type":"string","enum":["svg","png"],"default":"svg"},"focusIri":{"type":"string","description":"IRI of a canvas node. When set, the exported viewBox is clipped to the bounding box of that node and all its direct canvas neighbours. Omit for a full-canvas export."},"focusPadding":{"type":"integer","default":80,"description":"Padding (canvas units) around the focal neighbourhood bounding box. Default 80."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"setViewMode","kind":"act","impl":"imperative","description":"Switch the canvas between ABox view (individuals/instances) and TBox view (ontology classes/properties). IMPORTANT: Ontosphere has two separate canvas views. ABox (\"abox\") shows owl:NamedIndividual and instance nodes. TBox (\"tbox\") shows owl:Class, owl:ObjectProperty, owl:AnnotationProperty, and other schema nodes. Switching views replaces the entire canvas — nodes from the other view are hidden, not deleted. addNode writes triples and the canvas auto-populates in the correct view based on rdf:type. Always call setViewMode before exportImage if you need to capture a specific layer.","inputSchema":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["abox","tbox"],"description":"abox = instance view | tbox = ontology/class view"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"addNode","kind":"act","impl":"imperative","description":"Create a NEW entity on the canvas. Writes rdf:type(s) + rdfs:label atomically so the canvas pipeline fires once, then auto-navigates to the new node. The node appears in the view matching its rdf:type (owl:Class → TBox; owl:ObjectProperty → TBox; owl:AnnotationProperty → TBox; owl:NamedIndividual or unknown → ABox). To assign multiple types at once (e.g. owl:NamedIndividual + ex:SalamiTopping) use typeIris:[\"owl:NamedIndividual\",\"ex:SalamiTopping\"] — do NOT call addNode + addTriple separately for this. Object and annotation properties are first-class OWL entities — create them as nodes with typeIri=owl:ObjectProperty, then assert rdfs:domain and rdfs:range on them via addTriple. Use setViewMode before calling addNode. For 5+ individuals use loadRdf(turtle=...) instead. Use addTriple (not addNode) to add properties or relationships to an entity that already exists.","inputSchema":{"type":"object","properties":{"iri":{"type":"string"},"typeIri":{"type":"string","description":"Single rdf:type IRI. Use typeIris for multiple types."},"typeIris":{"type":"array","items":{"type":"string"},"description":"One or more rdf:type IRIs. Use when an individual needs multiple types, e.g. [\"owl:NamedIndividual\",\"ex:SalamiTopping\"]. Takes precedence over typeIri."},"label":{"type":"string","description":"rdfs:label value for this individual"}},"required":["iri"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"removeNode","kind":"act","impl":"imperative","description":"Remove a canvas node (ABox individual) and all its RDF triples. Both the canvas element and all quads with this IRI as subject are deleted.","inputSchema":{"type":"object","properties":{"iri":{"type":"string"}},"required":["iri"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"expandNode","kind":"act","impl":"imperative","description":"Expand canvas node(s) to show annotation property cards. Pass iri to expand one node; omit iri to expand all nodes at once. Pass expand=false to collapse.","inputSchema":{"type":"object","properties":{"iri":{"type":"string","description":"IRI of the node to expand. Omit to expand all canvas nodes."},"expand":{"type":"boolean","default":true}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"getNodes","kind":"answer","impl":"imperative","description":"Discover or filter all known entities (TBox classes and ABox individuals). Use labelContains to find by name — falls back to fuzzy match if nothing found (response includes fuzzyFallback:true). Use typeIri to filter by class, focusFirst:true to pan the viewport to the first canvas match. Use this before addNode/addTriple to resolve IRIs.","inputSchema":{"type":"object","properties":{"typeIri":{"type":"string"},"labelContains":{"type":"string"},"limit":{"type":"integer","default":100},"focusFirst":{"type":"boolean","default":false}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"searchTerms","kind":"answer","impl":"imperative","description":"Search existing ontology terms (classes / properties / individuals) by label or local name across all loaded ontologies (urn:vg:ontologies) and the asserted graph, so you can REUSE an existing IRI instead of minting a new ex: one. ALWAYS call this before creating a new class or property — if a pmdco:/bfo:/iof:/qudt: (etc.) term already exists, reuse it. Results are ranked (exact label > label prefix > label substring > local-name match) and include the resolved prefix when known. Covers terms already loaded into the store; it does not query remote registries (LOV/BioPortal). To pull in more vocabularies first, use loadOntology.","inputSchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Label or local-name substring to search for (case-insensitive), e.g. \"process\" or \"Specimen\"."},"kinds":{"type":"array","items":{"type":"string","enum":["class","objectProperty","datatypeProperty","property","individual"]},"description":"Optional filter. Omit for classes + properties. \"property\" matches object, datatype and annotation properties."},"limit":{"type":"integer","default":25,"description":"Maximum results to return."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"addTriple","kind":"act","impl":"imperative","description":"Assert any RDF triple on entities that already exist on the canvas. IRI object → object-property edge, renders on canvas immediately (both nodes must already exist — call addNode first if needed). Literal object → annotation property (rdfs:comment, skos:definition, etc.), visible after expandNode. Use addNode (not addTriple) when creating an entity for the first time — addNode writes type+label atomically and navigates to the new node. BLANK NODES: label MUST start with underscore-colon: \"_:b0\" NOT \" :b0\" NOT \":b0\". OWL RESTRICTIONS via blank-node labels — 4 addTriple calls per restriction (use a DISTINCT label per restriction: _:b0, _:b1, _:b2 …): addTriple(\"_:b0\",\"rdf:type\",\"owl:Restriction\") [MUST be owl:Restriction, NOT owl:Class] + addTriple(\"_:b0\",\"owl:onProperty\",\"ex:hasPart\") + addTriple(\"_:b0\",\"owl:someValuesFrom\",\"ex:SalamiTopping\") + addTriple(\"ex:SalamiPizza\",\"owl:equivalentClass\",\"_:b0\"). Same label → same IRI → restrictions collapse — always use a distinct label per restriction. Alternatively use loadRdf with Turtle blank-node syntax (see loadRdf description).","inputSchema":{"type":"object","properties":{"subjectIri":{"type":"string"},"predicateIri":{"type":"string","description":"IRI of the predicate (e.g. rdfs:subClassOf, owl:disjointWith, rdfs:domain)"},"objectIri":{"type":"string"}},"required":["subjectIri","predicateIri","objectIri"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"removeLink","kind":"transact","impl":"imperative","description":"Remove ANY triple from the RDF store, given its subject, predicate, and object. Despite the name it is not limited to object-property edges: the object may be an IRI (an ABox edge or a TBox axiom such as owl:disjointWith / rdfs:subClassOf) OR a literal value (an annotation like rdfs:comment) — the matching triple is removed in all cases. To remove the EXACT axiom a reasoner repair points at — which may physically live in an imported ontology graph and/or carry a typed/language-tagged literal — pass the optional graphName (e.g. \"urn:vg:ontologies\") and, for literal objects, objectIsLiteral=true with objectDatatype/objectLanguage. These map 1:1 onto explainDiagnostics.suggestedRepairs action.args (graph / objectDatatype / objectLanguage / objectTermType), so reasoner-computed repairs apply faithfully. Omitting them targets urn:vg:data and treats the object as an IRI (legacy behaviour).","inputSchema":{"type":"object","properties":{"subjectIri":{"type":"string"},"predicateIri":{"type":"string"},"objectIri":{"type":"string"},"graphName":{"type":"string","description":"Named graph the triple lives in (e.g. \"urn:vg:ontologies\"). Defaults to urn:vg:data. Required to remove an imported-schema axiom — a data-graph removal would silently match nothing."},"objectIsLiteral":{"type":"boolean","description":"Set true when the object is a literal value (not an IRI) so it is matched as a Literal term, not string-coerced into an IRI."},"objectDatatype":{"type":"string","description":"Datatype IRI of a literal object (e.g. xsd:integer) so \"42\"^^xsd:integer is matched exactly and a same-lexical \"42\" string is left untouched."},"objectLanguage":{"type":"string","description":"Language tag of a literal object (e.g. \"en\")."}},"required":["subjectIri","predicateIri","objectIri"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"getLinks","kind":"answer","impl":"imperative","description":"Return object-property triples (edges) currently in the RDF store. Filter by subject, predicate, or object IRI.","inputSchema":{"type":"object","properties":{"subjectIri":{"type":"string"},"predicateIri":{"type":"string"},"objectIri":{"type":"string"},"limit":{"type":"integer","default":100}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"runLayout","kind":"act","impl":"imperative","description":"Apply a layout algorithm to reposition canvas nodes.","inputSchema":{"type":"object","properties":{"algorithm":{"type":"string","enum":["dagre-lr","dagre-tb","elk-layered","elk-force","elk-stress","elk-radial"]},"spacing":{"type":"number","description":"Minimum distance between nodes in pixels. Defaults to 120."}},"required":["algorithm"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"focusNode","kind":"act","impl":"imperative","description":"Pan and zoom to one specific node. Use when you know which node to highlight. To fit all nodes into view, use fitCanvas instead.","inputSchema":{"type":"object","properties":{"iri":{"type":"string"}},"required":["iri"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"fitCanvas","kind":"act","impl":"imperative","description":"Zoom out to fit all nodes in the viewport. Use before exportImage or for a full overview. To centre on one node, use focusNode instead.","inputSchema":{"type":"object"},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"clusterNodes","kind":"act","impl":"imperative","description":"Group canvas nodes into clusters. Provide iris to group exactly those nodes directly, or provide algorithm to run community-detection on all canvas nodes. Fails if any target node is already in a cluster.","inputSchema":{"type":"object","properties":{"iris":{"type":"array","items":{"type":"string"},"description":"Optional subset of node IRIs to group. When provided, groups exactly these nodes without running a community algorithm."},"algorithm":{"type":"string","description":"Community-detection algorithm. Required when iris is not provided.","enum":["label-propagation","louvain","kmeans"]}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"layoutNodes","kind":"act","impl":"imperative","description":"Lay out a named subset of canvas nodes together in a free area, pan the viewport to them, and return the bounding box. Fails if any IRI is not on the canvas or is inside a cluster.","inputSchema":{"type":"object","properties":{"iris":{"type":"array","items":{"type":"string"},"description":"IRIs of the canvas nodes to lay out together."},"algorithm":{"type":"string","description":"Layout algorithm to apply to the subset. Defaults to elk-layered.","enum":["dagre-lr","dagre-tb","elk-layered","elk-force","elk-stress","elk-radial"]},"spacing":{"type":"number","description":"Minimum distance between nodes in pixels. Defaults to 120."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"runReasoning","kind":"act","impl":"imperative","description":"Run OWL reasoning over the loaded graph and infer new triples. Default backend is 'konclude' (full OWL 2 DL). Pass reasonerBackend='n3' to use N3 rule-based inference instead. Pass clearBefore=true to clear previous inferences first. SHACL validation runs by default after reasoning if shapes are loaded; pass shaclValidation=false to skip.","inputSchema":{"type":"object","properties":{"clearBefore":{"type":"boolean","default":false},"reasonerBackend":{"type":"string","enum":["konclude","n3"],"description":"Reasoning backend: 'konclude' (OWL 2 DL, default) or 'n3' (N3 rule-based)"},"shaclValidation":{"type":"boolean","default":true,"description":"Run SHACL validation after reasoning (default true). Pass false to skip."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"clearInferred","kind":"act","impl":"imperative","description":"Remove all DL-derived (Konclude-inferred) triples from the graph.","inputSchema":{"type":"object"},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"explainDiagnostics","kind":"act","impl":"imperative","description":"Run the full symbolic verifier (OWL 2 DL reasoning + SHACL) and return ONE structured diagnosis of everything wrong with the current graph: { isConsistent, justifications, unsatisfiableClasses, shaclViolations, repairBrief, suggestedRepairs }. When isConsistent=false, justifications lists each minimal contradictory axiom set (MIPS) — remove or revise one axiom per set. laconicJustifications (Horridge, Parsia & Sattler, ISWC 2008) is the superfluous-part-free refinement aligned by index with justifications: each entry pinpoints the precise culprit axiom PART — e.g. the \"A ⊑ B\" part of \"A ⊑ B ⊓ C\" — with parts[] carrying the part and its source axiom (sourceSubject/sourcePredicate/sourceObject), sharpened (a superfluous part was dropped) and skipped (a cost cap suppressed laconic for that MIPS). The repair brief and the axiom-weakening repairs use it to target the minimal culprit conjunct. shaclViolations are data-shape failures; repairBrief is a ranked plain-language summary to act on. suggestedRepairs is a ranked list of EXECUTABLE, reasoner-computed fixes: each { id, issue, action:{tool,args}, rationale, verifiedConsistent?, verifiedSet?, justificationsCovered?, needsValue?, needsManualReview? }. For inconsistencies the DELETION repairs (kind:\"delete\") form a minimal hitting set over the MIPS — removing the WHOLE set restores consistency. Apply each via its action.tool (always removeLink for inconsistency repairs; it removes IRI- and literal-object triples and TBox axioms alike) with action.args. AXIOM WEAKENING (kind:\"weaken\", ids W1,W2,…): a LESS-destructive ALTERNATIVE to deletion (Troquard et al. AAAI 2018; Li & Lambrix ISWC 2024). For an rdfs:subClassOf culprit A ⊑ D it offers a logically weaker replacement A ⊑ D′ (D′ a named superclass of D) or drops a conjunct — preserving more knowledge than deletion. Each weakening carries batch:{removes,adds} (remove the original A ⊑ D, add the weaker A ⊑ D′), weakerThan (\"A ⊑ D\"), alternativeTo (the deletion repair id), and weakeningVerified (true ⇒ removing the original restores consistency AND the weaker axiom is entailed by it, so it cannot re-break consistency). Apply a weakening by performing its batch (remove+add); prefer the most-specific weakening, fall back to deletion only when no weakening suffices. verifiedConsistent reports whether removing that ONE axiom alone restores consistency; with multiple independent contradictions this is commonly false for every repair even though the fix is correct — it means \"not ALONE\", not \"wrong\". The top-level repairSetVerifiedConsistent (and per-repair verifiedSet) reports whether removing the FULL deletion set together restores consistency — that is the signal to trust; apply the entire set. needsManualReview:true marks a contradiction with no auto-computable repair (inspect manually). SHACL repairs use addTriple with needsValue:true when you must supply the object value. Use after authoring to decide what to fix. Read-only: never mutates asserted data.","inputSchema":{"type":"object","properties":{"maxJustifications":{"type":"number","default":3,"description":"Max independent inconsistency justifications (MIPS) to return."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"explainEntailment","kind":"answer","impl":"imperative","description":"Explain WHY a specific entailed axiom holds — Horridge-style justifications for an ARBITRARY entailed axiom (not just inconsistency). Ask 'why is A rdfs:subClassOf B?' or 'why is x rdf:type C?' and get the minimal set(s) of asserted axioms whose conjunction logically entails it. Returns { isEntailed, justifications, summary }: isEntailed=true means the OWL 2 DL reasoner derives the axiom; justifications is a list of minimal axiom sets (each { subject, predicate, object }[]). Empty justifications with isEntailed=true ⇒ the axiom is directly asserted (nothing to derive) or its shape is unsupported. isEntailed=false ⇒ not entailed. summary is a plain-language 'Inferred because: …' explanation. Supported shapes: rdfs:subClassOf and rdf:type with an IRI object (e.g. transitive subclass, domain/range-driven type inference). Read-only: never mutates asserted data.","inputSchema":{"type":"object","required":["subjectIri","predicateIri","objectIri"],"properties":{"subjectIri":{"type":"string","description":"IRI of the axiom subject (the subclass, or the individual)."},"predicateIri":{"type":"string","description":"IRI of the predicate — rdfs:subClassOf or rdf:type."},"objectIri":{"type":"string","description":"IRI of the axiom object (the superclass, or the class)."},"maxJustifications":{"type":"number","default":1,"description":"Maximum number of independent justifications to return."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"getCapabilities","kind":"answer","impl":"imperative","description":"Return available layout algorithms, export formats, and loaded ontologies.","inputSchema":{"type":"object"},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"getGraphState","kind":"answer","impl":"imperative","description":"Return a summary of the current graph state scoped to the requested graphs. Default (graphs omitted): data + inferred — canvas node/link counts. Include \"urn:vg:shapes\" to also get SHACL validation status.","inputSchema":{"type":"object","properties":{"graphs":{"type":"array","items":{"type":"string","enum":["urn:vg:data","urn:vg:inferred","urn:vg:shapes"]},"default":["urn:vg:data","urn:vg:inferred"],"description":"Graphs to summarise. Defaults to [urn:vg:data, urn:vg:inferred]. Add urn:vg:shapes to include SHACL validation state."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"setNamespace","kind":"act","impl":"imperative","description":"Register or update an IRI prefix (upsert). Creates the prefix if new, replaces it if already registered. Use before IRI arguments to enable short prefix:local notation.","inputSchema":{"type":"object","properties":{"prefix":{"type":"string","description":"Prefix without colon (e.g. \"myns\")"},"namespace":{"type":"string","description":"Full IRI namespace ending with # or / (e.g. \"http://myns.org/\")"}},"required":["prefix","namespace"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"removeNamespace","kind":"act","impl":"imperative","description":"Unregister an IRI prefix from the namespace registry.","inputSchema":{"type":"object","properties":{"prefix":{"type":"string"}},"required":["prefix"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"listNamespaces","kind":"answer","impl":"imperative","description":"Return all registered IRI prefixes and their namespace URIs.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"getNodeDetails","kind":"answer","impl":"imperative","description":"Fetch every triple for one entity — asserted (urn:vg:data) and inferred (urn:vg:inferred). Inferred triples are marked inferred:true. Also returns shaclMessages[] with any SHACL validation errors/warnings for this node (severity, rule, message, sourceShape). Use after runReasoning to inspect inferences and SHACL compliance. Call getNodes first to find the IRI.","inputSchema":{"type":"object","required":["iri"],"properties":{"iri":{"type":"string","description":"IRI of the entity to inspect. Prefix notation supported (e.g. ex:Alice)."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"updateNode","kind":"act","impl":"imperative","description":"Update annotation properties of an existing entity without deleting it (preserves all edges). Only modifies asserted triples in urn:vg:data.","inputSchema":{"type":"object","required":["iri"],"properties":{"iri":{"type":"string"},"label":{"type":"string"},"typeIri":{"type":"string"},"setProperties":{"type":"array","items":{"type":"object","required":["predicateIri","value"],"properties":{"predicateIri":{"type":"string"},"value":{"type":"string"}}}},"removeProperties":{"type":"array","items":{"type":"object","required":["predicateIri"],"properties":{"predicateIri":{"type":"string"}}}}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"getNeighbors","kind":"answer","impl":"imperative","description":"Explore the graph around one node — returns all reachable nodes and edges up to depth hops. Use when you don't know what's connected. For a direct connection between two known nodes, use findPath instead.","inputSchema":{"type":"object","required":["iri"],"properties":{"iri":{"type":"string"},"depth":{"type":"integer","default":2},"direction":{"type":"string","enum":["out","in","both"],"default":"both"},"layer":{"type":"string","enum":["abox","tbox","both"],"default":"both"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"findPath","kind":"answer","impl":"imperative","description":"Find the shortest route between two specific nodes. Use when you know both endpoints and want the connecting hop sequence. For open-ended neighbourhood exploration, use getNeighbors instead.","inputSchema":{"type":"object","required":["fromIri","toIri"],"properties":{"fromIri":{"type":"string"},"toIri":{"type":"string"},"maxDepth":{"type":"integer","default":6}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"loadShacl","kind":"act","impl":"imperative","description":"Load SHACL shapes from inline Turtle text into the shapes graph (urn:vg:shapes). Call validateGraph to run validation after loading.","inputSchema":{"type":"object","required":["turtle"],"properties":{"turtle":{"type":"string"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"validateGraph","kind":"act","impl":"imperative","description":"Validate the asserted graph (urn:vg:data) against SHACL shapes loaded in urn:vg:shapes. Returns conforms flag and structured violation list.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"loadShaclFromUrl","kind":"act","impl":"imperative","description":"Load SHACL shapes from a URL into urn:vg:shapes. Supports direct .ttl file URLs, GitHub folder tree URLs (auto-discovers .ttl/.shacl files), and comma-separated mixes.","inputSchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL to load shapes from. Can be a direct .ttl URL, a GitHub tree URL (https://github.com/owner/repo/tree/branch/path), or comma-separated mix of both."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"listAgentEdits","kind":"answer","impl":"imperative","description":"List recorded agent edit batches (provenance of mutations) most-recent-first. Each mutating tool call (addNode/updateNode/removeNode/addTriple/removeLink/loadRdf) is recorded as a PROV-O Activity in the urn:vg:provenance sidecar graph. Returns [{batchId, tool, agent, timestamp, addedCount, removedCount, reverted}]. Use diffAgentEdits to inspect triples and revertAgentBatch to undo. The journal is in-memory and volatile (cleared on page reload).","inputSchema":{"type":"object","properties":{"limit":{"type":"integer","description":"Maximum number of batches to return (most recent first)."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"diffAgentEdits","kind":"answer","impl":"imperative","description":"Inspect the exact triples added and removed by a recorded agent edit batch. Pass the batchId from listAgentEdits. Returns {tool, agent, timestamp, reverted, added:[{s,p,o}], removed:[{s,p,o}]}.","inputSchema":{"type":"object","required":["batchId"],"properties":{"batchId":{"type":"string","description":"Batch identifier from listAgentEdits."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"revertAgentBatch","kind":"act","impl":"imperative","description":"Undo a recorded agent edit batch: re-removes the triples it added and re-adds the triples it removed, in urn:vg:data. Idempotent — reverting an already-reverted batch is a safe no-op (reported via alreadyReverted). Best-effort if the graph changed since: returns {success, alreadyReverted?, reverted:{addedRemoved, removedRestored}, requested:{...}}. Marks the batch reverted (prov:wasInvalidatedBy + vg:reverted true) in urn:vg:provenance.","inputSchema":{"type":"object","required":["batchId"],"properties":{"batchId":{"type":"string","description":"Batch identifier from listAgentEdits."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"generateDatasetMetadata","kind":"answer","impl":"imperative","description":"Generate VoID + DCAT metadata describing the current dataset (triple/class/property counts, partitions, vocabularies used) for FAIR publishing. Computes void:triples, void:entities, void:classes, void:properties, void:distinctSubjects/distinctObjects, per-class void:classPartition and per-predicate void:propertyPartition, void:vocabulary / dcterms:conformsTo for each vocabulary used, and a dcat:Dataset with dcterms:title/description plus dcat:distribution entries for each export format. Returns { turtle, summary } — the Turtle document and a structured summary (triples, classes, properties, subjects, vocabularies, topClasses, topProperties). Pass includeInferred=true to fold urn:vg:inferred triples into the counts. Read-only: never mutates the graph.","inputSchema":{"type":"object","properties":{"includeInferred":{"type":"boolean","default":false,"description":"Fold inferred triples (urn:vg:inferred) into the counts and partitions."},"format":{"type":"string","enum":["turtle"],"default":"turtle","description":"Serialisation of the metadata document. Only \"turtle\" is currently supported."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"},{"name":"help","kind":"answer","impl":"imperative","description":"Call with no arguments to get full relay usage instructions and the complete tool list. Pass {\"tool\":\"<name>\"} for the full schema of a specific tool.","inputSchema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name to describe. Omit to list all tools."}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/ontosphere/"}],"category":"Developer Tools","favicon":"/favicons/thhanke.github.io.svg","apiSurface":"spec","toolCount":42}}