Memory

v2.2.2
io.github.modelcontextprotocol/server-memory Checked 2 hours ago Published 4 days ago

Persistent memory for an assistant, stored as a knowledge graph of entities and relations

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_entities Create Entities

Create multiple new entities in the knowledge graph. An entity whose name already exists, or repeats an earlier entity in the same call, is skipped and its observations are not added; the result lists the skipped names in `skipped`. Use add_observations to add observations to an existing entity.

ParameterTypeDescription
entities *arrayThe entities to create, each with a name unique in the graph

create_relations Create Relations

Create multiple new relations between entities in the knowledge graph. Relations should be in active voice

ParameterTypeDescription
relations *arrayThe relations to create. Both ends must name existing entities; a relation already in the graph is not added again

add_observations Add Observations

Add new observations to existing entities in the knowledge graph

ParameterTypeDescription
observations *arrayThe observations to add, grouped by entity. Each entity must already exist; an observation it already has is not added again

delete_entities Delete Entities

Delete whole entities from the knowledge graph, together with every relation that points to or from them and all their observations. Use it only to remove an entity entirely; to remove a link between two entities and keep both, use delete_relations, and to remove facts from an entity, use delete_observations. Cannot be undone.

ParameterTypeDescription
entityNames *arrayAn array of entity names to delete

delete_observations Delete Observations

Delete specific observations from entities in the knowledge graph

ParameterTypeDescription
deletions *arrayThe observations to delete, grouped by entity, each matched by its exact text

delete_relations Delete Relations

Delete specific relations (from, to, relationType) from the knowledge graph and keep the entities they connect. Each relation must match an existing one exactly on all three fields; if unsure, call open_nodes (or search_nodes) first to read the stored relationType. Use it to remove a link between two entities; to remove an entity itself, use delete_entities. Cannot be undone.

ParameterTypeDescription
relations *arrayAn array of relations to delete

read_graph Read Graph

Read the entire knowledge graph: every entity with its observations, and every relation. The result grows with the graph, so use this only when you need everything; prefer search_nodes to find entities by keyword and open_nodes to read entities whose names you know.

ParameterTypeDescription
entityTypesarrayReturn only entities whose entityType is one of these (exact match), and only the relations that touch one of them. Omit to return every entity.
observationLimitintegerReturn at most this many observations per entity (the first ones, in the order they were added) and add each entity's total as observationCount. Use 0 for names, types and counts only: a cheap overvie…

search_nodes Search Nodes

Search the knowledge graph for entities whose name, type or observations contain the query (case-insensitive). Use this when you have a keyword, a topic or part of a name but not the exact entity names. Prefer open_nodes when you already know the exact names, and use read_graph only when you need the whole graph. Returns the matching entities and every relation that touches one of them.

ParameterTypeDescription
query *stringThe search query to match against entity names, types, and observation content
limitintegerReturn at most this many matching entities (the first matches, in stored order), with the relations that touch them. Omit to return every match.
observationLimitintegerReturn at most this many observations per entity (the first ones, in the order they were added) and add each entity's total as observationCount. Use 0 for names, types and counts only: a cheap overvie…

open_nodes Open Nodes

Retrieve specific entities by their exact names, with every relation that touches one of them. Use this when you already know the names (from the conversation, or from an earlier search_nodes or read_graph result); it is the cheapest way to read entities you can name. Prefer search_nodes when you only have a keyword or part of a name. Names that do not exist are skipped.

ParameterTypeDescription
names *arrayAn array of entity names to retrieve
observationLimitintegerReturn at most this many observations per entity (the first ones, in the order they were added) and add each entity's total as observationCount. Use 0 for names, types and counts only: a cheap overvie…