Skip to content

Reference

MCP tools

knowmind exposes 15 MCP tools over JSON-RPC 2.0 at https://knowmind.de/api/mcp/v1. This reference documents each signature, every parameter, the return schema, a complete example and the typical error cases. MCP protocol version: 2025-06-18.

General

  • Endpoint: POST https://knowmind.de/api/mcp/v1
  • Authentication: Authorization: Bearer kmt_…
  • Body: JSON-RPC 2.0 request with method: "tools/call" and parameters in params.arguments.
  • Response format: JSON-RPC response. With Accept: text/event-stream the endpoint returns Streamable HTTP frames (SSE) — for native custom connectors in Claude.ai and ChatGPT.
  • Scope model: read is enough for recall and list tools; write for create and maintain; admin for plan-relevant actions. Scopes are enforced server-side per tool call.
  • Tenant isolation: a token belongs to exactly one workspace. For the content you query, the database checks on every query which workspace a row belongs to.

knowmind_recall

Scope: readsince 0.3.0

Hybrid recall against the Memory Store of your workspace. Combines full-text (BM25 with German analyzer), vector search (multilingual-e5-large, 1024 dimensions) and a search in the Knowledge Graph. Cross-encoder rerank for the top hits. The response starts with the field kein_belastbarer_treffer. When it is true, the corpus most likely holds no answer to the question; the field hinweis says so, and the hits are still included. The flag is an estimate from the rerank score and the coverage of the query terms, not proof.

Parameters

NameTypeRequiredDefaultNote
querystringyes—Natural-language question
kintegerno5Number of hits (1 to 25)
hopsintegerno2Accepted (0 to 3); currently has no effect on recall.

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "knowmind_recall",
    "arguments": {
      "query": "Who is the onboarding contact?",
      "k": 5,
      "hops": 2
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "kein_belastbarer_treffer": false,
    "hits": [
      {
        "memory_id": "memory_onboarding_2026_03",
        "title": "Onboarding contacts Q2 2026",
        "content": "Anna Müller owns onboarding for new service staff, deputised by Tomasz Kowalski.",
        "score": 0.93,
        "source": "internal-handbook-v3"
      }
    ],
    "elapsed_ms": 187
  }
}

Error cases

CodeMeaning
-32602Invalid params (query missing or empty)
-32000Service-token unconfigured or provider error
401Bearer token missing or invalid
-32004Question limit reached — the waiting time is in message

knowmind_recall_at_time

Scope: readsince 0.3.0

Point-in-time recall (bi-temporal). Returns only memories that were valid at the given time — i.e. valid_from <= as_of AND (valid_to > as_of OR valid_to is unset). Suitable for "What did the Memory Store know on 14 March?". Here too kein_belastbarer_treffer comes first, judged on the hits visible at as_of.

Parameters

NameTypeRequiredDefaultNote
querystringyes—Natural-language question
as_ofstring (ISO 8601)nonowValidity point, e.g. 2026-03-14T00:00:00Z
kintegerno5Number of hits (1 to 25)

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "knowmind_recall_at_time",
    "arguments": {
      "query": "Müller GmbH plan status",
      "as_of": "2026-03-14T00:00:00Z",
      "k": 3
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "kein_belastbarer_treffer": false,
    "hits": [
      {
        "memory_id": "memory_mueller_plan_v2",
        "title": "Müller GmbH plan as of 2026-02-01",
        "content": "Müller GmbH is on Business with five seats.",
        "valid_from": "2026-02-01T00:00:00Z",
        "valid_to": "2026-04-01T00:00:00Z",
        "score": 0.88
      }
    ]
  }
}

Error cases

CodeMeaning
-32602Invalid params (query missing, as_of not ISO 8601)
-32004Question limit reached — the waiting time is in message
401Bearer token missing or invalid

knowmind_list_relations

Scope: readsince 0.3.0

Returns all inbound and outbound typed relations for a memory. Per relation: type, source and target node, creation time.

Parameters

NameTypeRequiredDefaultNote
memory_idstringyes—ID of the memory whose relations to fetch

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "knowmind_list_relations",
    "arguments": { "memory_id": "memory_workshop_2026_03_12" }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "outgoing": [
      { "rel_type": "FOR_CLIENT", "to": "memory_mueller_client" },
      { "rel_type": "REFERENCES", "to": "memory_qm_handbook" }
    ],
    "incoming": [
      { "rel_type": "SUPERSEDES", "from": "memory_workshop_2026_03_19" }
    ]
  }
}

Error cases

CodeMeaning
-32602Invalid params (memory_id missing)
404Memory not found

knowmind_list_inferred

Scope: readsince 2026-10-10

Lists relations that wait for a decision: relations knowmind inferred from text (reason inferred_from_text) and relations that start from a document although their kind needs a person, organisation or similar (reason starts_from_document). Per relation: edge_id, type, state (open, confirmed, rejected), reason, both entries, the source (for example the extraction) and the evidence entry; plus the counts per state. The derivation rules use an open relation only after it is confirmed.

Parameters

NameTypeRequiredDefaultNote
statusstringno—open, confirmed or rejected; without it all states
limitintegerno—1 to 200, default 50
offsetintegerno—Number of relations to skip

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": { "name": "knowmind_list_inferred", "arguments": { "status": "open", "limit": 20 } }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 5,
  "result": {
    "counts": { "open": 12, "confirmed": 3, "rejected": 1 },
    "relations": [
      { "edge_id": "5:a1b2:3301", "rel_type": "WORKS_FOR", "state": "open",
        "from": { "id": "entity-maria", "name": "Maria Keller" },
        "to": { "id": "entity-northwind", "name": "Northwind Studio" },
        "source": "claude-extract", "evidence": "memory_kickoff_notes" }
    ]
  }
}

Error cases

CodeMeaning
-32002Missing scope: read

knowmind_review_inferred

Scope: writesince 2026-10-10

Records a decision on one inferred relation. confirm: the derivation rules use the relation from now on. reject: the relation, its reverse relation and every relation derived from it get valid_to; nothing is deleted. undo: takes a rejection back, together with the reverse and derived relations. Returns the state before and after and the number of reverse and derived relations affected.

Parameters

NameTypeRequiredDefaultNote
edge_idstringyes—edge_id from knowmind_list_inferred
decisionstringyes—confirm, reject or undo
evidencestringno—ID of the entry that supports the decision

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": { "name": "knowmind_review_inferred", "arguments": { "edge_id": "5:a1b2:3301", "decision": "reject" } }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 6,
  "result": {
    "edge_id": "5:a1b2:3301",
    "before": { "state": "open", "valid_to": null },
    "after": { "state": "rejected", "valid_to": "2026-10-10T04:40:00+02:00" },
    "derived_relations_affected": 1
  }
}

Error cases

CodeMeaning
-32002Missing scope: write
404The relation is not in this workspace's review list
409Decision not possible in this state, e.g. confirming a rejected relation before undo

knowmind_health

Scope: —since 0.1.0

Returns service status. Reachable with any token. No tenant data.

Parameters

NameTypeRequiredDefaultNote
No parameters

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "tools/call",
  "params": { "name": "knowmind_health", "arguments": {} }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "status": "ok",
    "service": "memory",
    "version": "0.3.0"
  }
}

Error cases

CodeMeaning
503Service unavailable (memory service, Postgres or graph)

knowmind_stats

Scope: readsince 0.2.0

Current corpus statistics for the token's workspace: number of memories, number of relations, number of chunks in the vector index.

Parameters

NameTypeRequiredDefaultNote
No parameters

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": { "name": "knowmind_stats", "arguments": {} }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 5,
  "result": {
    "memories": 1219,
    "edges": 5512,
    "chunks": 3214
  }
}

Error cases

CodeMeaning
401Bearer token missing or invalid

knowmind_list_recent

Scope: readsince 0.4.0

Lists the most recently created documents and memories of the workspace, sorted by creation date descending (created_at). Source is the document corpus — the same base that recall searches. Graph entities without timestamps do not appear; the count therefore intentionally differs from knowmind_stats (memories).

Parameters

NameTypeRequiredDefaultNote
kintegerno10Number of latest entries (1 to 50)

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "tools/call",
  "params": {
    "name": "knowmind_list_recent",
    "arguments": { "k": 3 }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 11,
  "result": {
    "items": [
      {
        "id": "5a3c9f2e-1b7d-4c21-9e0a-8f6d2b3c4e5f",
        "title": "Onboarding Handbook v3",
        "status": "indexed",
        "indexed_chunks": 23,
        "created_at": "2026-06-10T07:12:44Z",
        "updated_at": "2026-06-10T07:12:51Z",
        "kind": "document"
      }
    ],
    "count": 1
  }
}

Error cases

CodeMeaning
-32002Scope read missing
401Bearer token missing or invalid

knowmind_store_memory

Scope: writesince 0.2.0

Creates a new memory persistently in the workspace: Postgres document, vector index and graph node. The entry is then findable via knowmind_recall and knowmind_list_recent. Append-only: entries with the same title are NOT replaced — versioning is handled by knowmind_update_fact. Sha-identical content is detected idempotently (response field unchanged). For longer texts with upsert-by-title, use knowmind_upload_document.

Parameters

NameTypeRequiredDefaultNote
titlestringno—Short title
contentstringyes—Full text
memory_typestring (enum)nosemanticsemantic, episodic, procedural, reference
tagsstring[]no—Tags for filtering
sourcestringno—Source, free text

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": {
    "name": "knowmind_store_memory",
    "arguments": {
      "title": "QM training mandatory",
      "content": "All service staff complete the QM training annually.",
      "memory_type": "procedural",
      "tags": ["qm","training"],
      "source": "internal-handbook"
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 6,
  "result": {
    "memory_id": "5a3c9f2e-1b7d-4c21-9e0a-8f6d2b3c4e5f",
    "id": "5a3c9f2e-1b7d-4c21-9e0a-8f6d2b3c4e5f",
    "title": "QM training mandatory",
    "status": "indexed",
    "chunks_written": 1,
    "embedding_provider": "fastembed"
  }
}

Error cases

CodeMeaning
-32002Scope write missing
-32603content_required (content missing or empty), too_large (content over 1,000,000 characters), ingest_failed (memory service error — no success is faked, the entry stays marked failed)
401Bearer token missing or invalid

knowmind_upload_document

Scope: writesince 0.2.0

Ingests a longer text persistently as a document. knowmind splits the text into sections, generates an embedding per section, and creates a graph node. Upsert-by-title (server default): if a document with the same title exists in the same domain, the new version supersedes the old one. The old version stays retrievable for earlier dates via knowmind_recall_at_time; nothing is deleted. The superseded IDs are returned in replaced_document_ids. If the same text already exists in another valid document of the same domain, knowmind creates no new one; the response returns that document's ID in memory_id and carries deduplicated.

Parameters

NameTypeRequiredDefaultNote
titlestringno—Document title
contentstringyes—Full document text
sourcestringno—Origin (URL, path); does not decide which document is superseded
replacebooleannotruefalse creates a new document next to the one with the same title

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "knowmind_upload_document",
    "arguments": {
      "title": "Onboarding Handbook v3",
      "content": "Chapter 1 — Onboarding flow …",
      "source": "internal-handbook-v3.md"
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 7,
  "result": {
    "memory_id": "7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
    "id": "7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
    "title": "Onboarding Handbook v3",
    "status": "indexed",
    "chunks_written": 23,
    "embedding_provider": "fastembed",
    "replaced_document_ids": ["1f2e3d4c-5b6a-4d7c-9e8f-a0b1c2d3e4f5"]
  }
}

Error cases

CodeMeaning
-32002Scope write missing
-32603content_required (content missing or empty), too_large (content over 1,000,000 characters), ingest_failed (memory service error)
401Bearer token missing or invalid

knowmind_update_fact

Scope: writesince 0.3.0

Bi-temporal update of an existing memory: the original gets valid_to = now, a new version with valid_from = now is created and linked via SUPERSEDES. The history stays auditable — old statements are not deleted, they are marked superseded.

Parameters

NameTypeRequiredDefaultNote
target_idstringyes—ID of the memory to update
new_titlestringyes—Title of the new version
new_contentstringyes—Content of the new version
update_reasonstringno—Reason, e.g. "Address changed"

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 8,
  "method": "tools/call",
  "params": {
    "name": "knowmind_update_fact",
    "arguments": {
      "target_id": "memory_mueller_address_v1",
      "new_title": "Müller GmbH address from 2026-06-01",
      "new_content": "Müller GmbH, Industriestraße 7, 32756 Detmold.",
      "update_reason": "Address changed effective 2026-06-01"
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 8,
  "result": {
    "old_memory_id": "memory_mueller_address_v1",
    "new_memory_id": "memory_mueller_address_v2",
    "supersedes_edge": "edge_supersedes_2026_05_23"
  }
}

Error cases

CodeMeaning
-32602Invalid params (required field missing)
404target_id not found
403Scope write missing

knowmind_end_fact

Scope: writesince 19.10.2026

Ends an entry that no longer applies and that nothing replaces, for example after a project closed or a source was withdrawn. The entry gets valid_to and drops out of knowmind_recall; knowmind_recall_at_time still finds it at an earlier time. Nothing is deleted and no new entry is created. Calling it again changes nothing.

Parameters

NameTypeRequiredDefaultNote
target_idstringyes—ID of the entry, from knowmind_recall
valid_tostringno—Time with time zone from which the entry no longer applies; defaults to now
reasonstringno—Reason, e.g. 'source withdrawn'

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 9,
  "method": "tools/call",
  "params": {
    "name": "knowmind_end_fact",
    "arguments": {
      "target_id": "3f6c2a1e-8b7d-4c11-9a52-0d4e8f2b7c90",
      "valid_to": "2026-10-11T22:10:00+02:00",
      "reason": "source withdrawn"
    }
  }
}

Example — response

json
{
  "document_id": "3f6c2a1e-8b7d-4c11-9a52-0d4e8f2b7c90",
  "titel": "Project folder: stock list",
  "gueltig_bis": "2026-10-11T20:10:00+00:00",
  "abschnitte": 3,
  "knoten": 1,
  "schon_beendet": false
}

Error cases

CodeMeaning
-32002Missing scope write
400valid_to without time zone, or not a valid id
404target_id not found
409Entry was already superseded by a new version

knowmind_link

Scope: writesince 0.3.0

Creates a typed relation between two memories. The inverse edge is materialised automatically. See the edge-types reference for the allowed types.

Parameters

NameTypeRequiredDefaultNote
from_idstringyes—Memory ID of the source node
to_idstringyes—Memory ID of the target node
rel_typestringyes—Edge type in UPPER_SNAKE_CASE (e.g. OWNS, FOR_CLIENT, SUPERSEDES)

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 9,
  "method": "tools/call",
  "params": {
    "name": "knowmind_link",
    "arguments": {
      "from_id": "memory_workshop_2026_03_12",
      "to_id":   "memory_mueller_client",
      "rel_type": "FOR_CLIENT"
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 9,
  "result": {
    "edge_id": "edge_for_client_2026_05_23",
    "inverse_edge_id": "edge_has_workshop_2026_05_23"
  }
}

Error cases

CodeMeaning
-32602Invalid params
400SHACL constraint violated (e.g. rel_type not allowed for the domain)
404from_id or to_id not found

knowmind_unlink

Scope: writesince 0.3.0

Ends a relation and its inverse. A recall at an earlier time still finds them.

Parameters

NameTypeRequiredDefaultNote
from_idstringyes—Memory ID of the source node
to_idstringyes—Memory ID of the target node
rel_typestringyes—Edge type

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "tools/call",
  "params": {
    "name": "knowmind_unlink",
    "arguments": {
      "from_id": "memory_workshop_2026_03_12",
      "to_id":   "memory_mueller_client",
      "rel_type": "FOR_CLIENT"
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 10,
  "result": { "deleted": 1, "inverse_deleted": 1, "folgekanten": 0, "beendet_am": "2026-10-17T03:35:45.117565+00:00" }
}

Error cases

CodeMeaning
400Unknown edge type

knowmind_entity

Scope: writesince 2026-08-15

Creates the node for a thing the corpus talks about — a person, an organisation, an application, a host, a technology — or returns the existing one. Same name, same class and same workspace always return the same ID; calling twice creates no duplicate. Connect the node afterwards with knowmind_link.

Parameters

NameTypeRequiredDefaultNote
namestringyes—Proper name, as it would be written in a document. No role, no status, no description.
entity_classstringyes—Class from the catalogue (knowmind_schema → entityClasses), e.g. Person, Organization, Application, Host, Technology
descriptionstringno—One sentence saying what this is
aliasesstring[]no—Other spellings

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "tools/call",
  "params": {
    "name": "knowmind_entity",
    "arguments": {
      "name": "PostgreSQL",
      "entity_class": "Technology"
    }
  }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 11,
  "result": {
    "id": "…",
    "name": "PostgreSQL",
    "entity_class": "Technology",
    "created": true
  }
}

Error cases

CodeMeaning
-32002Missing scope: write
-32602Invalid params

knowmind_schema

Scope: readsince 2026-08-15

Returns the relation catalogue of the workspace: every allowed relation with its subject and object classes and an explanation of when it fits, plus the classes for knowmind_entity. Call it before knowmind_link so the right relation is chosen.

Parameters

NameTypeRequiredDefaultNote
No parameters

Example — request

json
{
  "jsonrpc": "2.0",
  "id": 12,
  "method": "tools/call",
  "params": { "name": "knowmind_schema", "arguments": {} }
}

Example — response

json
{
  "jsonrpc": "2.0",
  "id": 12,
  "result": {
    "entityClasses": ["…"],
    "predicates": ["…"],
    "hinweis": "Pick the predicate whose subject and object classes match your two nodes. …"
  }
}

Error cases

CodeMeaning
-32002Missing scope: read

Related