Semogram Docs
OntologyReference

UI, assistant, HTTP API and MCP

Use only the public interface supported by each ontology action

The platform UI, a natural-language assistant request, HTTP resource API and MCP tool call are different input methods. A prompt describes intent; the assistant must use an available tool and real resources to perform it. Internal session routes are not workspace API-key interfaces.

Available actions

All HTTP paths below follow /api/v1/projects/<PROJECT_UUID>/. Bearer keys need the named scope and applicable read access. Mutation permissions do not create membership, credentials or missing source records. Account-linked actor requirements apply to definition authoring.

ActionHTTP APIMCPPermission
List/create definitionGET/POST ontology/definitionsontology_list / ontology_createontologies:read/write
Inspect definitionGET ontology/definitions/<ID>ontology_getontologies:read
Validate proposed modelUse supported UI validation; no standalone public route listed hereontology_validateontologies:read
Commit definition versionPOST ontology/definitions/<ID>/versionsontology_updateontologies:write
List/inspect definition historyGET versions, optional versionId selectorontology_version_list / ontology_version_getontologies:read
Activate definition versionPOST ontology/definitions/<ID>/versions/<VERSION_ID>/activateNo dedicated activation toolontologies:write
Compile/inspect project packagePOST ontology/compile; GET ontologyInspect through available ontology toolsontologies:write/read
List/create bindingsGET/POST ontology/read-bindingsontology_read_binding_list / ontology_read_binding_createbindings:read/write
Inspect/update bindingGET/PUT ontology/read-bindings/<ID>ontology_read_binding_get / ontology_read_binding_updatebindings:read/write
List/create queriesGET/POST ontology/queriesquery_list / query_createqueries:read/write
Inspect/update queryGET/PUT ontology/queries/<ID>query_get / query_updatequeries:read/write
Publish reviewed queryPOST ontology/queries/<ID>/releasesquery_publishqueries:publish
List/retire releasesGET/PATCH same releases pathquery_release_list / query_release_retirequeries:read/publish
Execute/poll/page queryPOST ontology/queries/<ID>/executequery_executequeries:execute
Cancel active result jobDELETE queries/<ID>/jobs/<JOB_ID>query_cancelqueries:execute
Read SPARQLGET/POST ontology/sparqlsparql_querysparql:query
Controlled SPARQL updatePOST ontology/sparql with update content typeNot exposed over MCPsparql:update
Inspect claim/captureNo generic public route documentedclaim_list / claim_get / capture_getqueries:read
Create/review human assertionProject Assertions UI; no generic public key endpointNo generic mutation toolSupported project reviewer workflow

Definition/binding/query creation and relevant version mutations use HTTP Idempotency-Key or MCP idempotencyKey where the action contract requires it. Publication uses an expected saved version; MCP publication also has its operation key. Use the discovered tool contract rather than assuming every mutation shares one payload shape.

Complete definition creation

The downloadable definition body contains the full model and manifest. Replace resource placeholders and use a unique operation key.

Create the definition through Ontology → Definitions, review its model/files and manifest, validate and save.

Create the operations-demo ontology definition using the complete model and manifest provided here. Select this project, show validation and proposed files before saving, and report its definition and active version IDs.
curl --request POST "https://platform.semogram.com/api/v1/projects/<PROJECT_UUID>/ontology/definitions" \
  --header "Authorization: Bearer ${SEMOGRAM_API_KEY}" \
  --header "Idempotency-Key: <UNIQUE_CREATE_KEY>" \
  --header "Content-Type: application/json" \
  --data-binary @definition.json
MCP tool call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ontology_create",
    "arguments": {
      "projectId": "<PROJECT_UUID>",
      "manifest": {
        "name": "operations-demo",
        "description": "Orders, customers and delivery evidence",
        "defaultNamespace": "https://example.com/operations#",
        "modelEntrypoints": [
          "model.ttl"
        ],
        "shapeEntrypoints": [],
        "imports": []
      },
      "files": [
        {
          "path": "model.ttl",
          "content": "@prefix ex: <https://example.com/operations#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\nex:Order a owl:Class ; rdfs:label \"Order\" .\nex:Customer a owl:Class ; rdfs:label \"Customer\" .\nex:orderId a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:string .\nex:status a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:string .\nex:total a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:decimal .\nex:delivered a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:boolean .\nex:isOpen a owl:DatatypeProperty ; rdfs:domain ex:Order ; rdfs:range xsd:boolean .\nex:customerName a owl:DatatypeProperty ; rdfs:domain ex:Customer ; rdfs:range xsd:string .\nex:placedBy a owl:ObjectProperty ; rdfs:domain ex:Order ; rdfs:range ex:Customer .",
          "contentType": "text/turtle"
        }
      ],
      "commitMessage": "Define the operations demo model",
      "idempotencyKey": "<UNIQUE_CREATE_KEY>"
    }
  }
}

Binding creation differs

HTTP accepts a binding body. MCP ontology_read_binding_create accepts {binding: {...}, idempotencyKey: ...}. The read binding page shows both exactly. Query-create content is a YAML string; query-execute takes only declared inputs/options and identifies an existing published query.

Project scoping and assistants

The examples include projectId for a workspace MCP connection. A project-bound connection already supplies project context; follow its discovered schema and omit additional scoping fields where required. A connected assistant should discover capabilities, inspect resource IDs and preview proposed mutations. Asking it to approve a claim or enable Consumer SPARQL does not invent a missing review tool or authorize an access change.

For full tool schemas use the MCP section. Plugin-backed materialization and endpoint reads retain their installed capability's contract and permissions.