skills / memorair-mesh-mcp.md
What it does: memory-mesh-mcp gives an AI a stable and structured memory for a whole chat or game. It remembers things as a knowledge graph:
All data lives in one file (). This keeps the AI instead of forgetting each turn.
skills / memorair-mesh-mcp.md
What it does: memory-mesh-mcp gives an AI a stable and structured memory for a whole chat or game. It remembers things as a knowledge graph:
All data lives in one file (). This keeps the AI instead of forgetting each turn.
memory.jsonπ¦ Every tool name starts with
mm_. "Add an NPC" =mm_add_npc. "Read the graph" =mm_read_graph. Always call themm_-prefixed names.
Each node has:
name β a unique name, e.g. Aragorn.nodeType β the kind of thing (npc, location, artifact, β¦).metadata β a list of text facts about the node.weight (optional) β 0β1, how strong or reliable a link is.Each edge has:
from β the start node name.to β the end node name.edgeType β the kind of link (owns, located_in, enemy_of, β¦).Rules that matter most for a small model:
mm_read_graph first so you reuse existing names and avoid duplicates.name for the same thing every time.mm_update_* replaces the old value. To keep old info, put it in metadata) or make a new node.metadata) for truth. Add "Source: β¦", "Reliability: High/Low", and "As of Chapter β¦" so you know whose word something is and when it was true.mm_delete_*) is final. Nodes do not come back. Only delete when you are sure.relationship) makes a link for free. When an add_* tool has a required relationship) field, MemoryMesh creates the node and its edge in one call.Each entity tool's exact fields, required fields, enums, and
relationship) shape come from that entity's.schema.json. The examples below show the typical shape.
Each tool does one job. Use the mm_) names.
mm_read_graph β return the whole graph as JSON. Args: none.mm_search_nodes β find nodes by text. Args: { "query": "sword" }.mm_open_nodes β get full details of some nodes. Args: { "names": ["Aragorn"] }.mm_add_nodes β add one or more nodes. Args: { "nodes": [ { "name", "nodeType", "metadata": ["β¦"] } ] }.mm_update_nodes β change existing nodes (same shape as add).mm_delete_nodes β remove nodes by name.mm_add_edges β add links. Args: { "edges": [ { "from", "to", "edgeType" } ] }.mm_update_edges β change existing edges (same shape as add).mm_delete_edges β remove edges.mm_add_metadata β add facts to a node. Args: { "metadata": [ { "nodeName", "contents": ["β¦"] } ] }.mm_delete_metadata β remove facts from a node.mm_add_npc β create an NPC. Args: { "name", "race" (pick from enum), "currentLocation" (a relationship) }.mm_update_npc β change an existing NPC (same fields as add).mm_delete_npc β remove an NPC.mm_add_player_character / mm_update_player_character / mm_delete_player_charactermm_add_location / mm_update_location / mm_delete_locationmm_add_artifact / mm_update_artifact / mm_delete_artifactmm_add_faction / mm_update_faction / mm_delete_factionmm_add_inventory / mm_update_inventory / mm_delete_inventorymm_add_currency / mm_update_currency / mm_delete_currencymm_add_quest / mm_update_quest / mm_delete_questmm_add_skills / mm_update_skills / mm_delete_skillsmm_add_temporal / mm_update_temporal / mm_delete_temporalmm_add_transportation / mm_update_transportation / mm_delete_transportationEach group has add (create), update (change β same fields as add), and delete (remove). Find the exact
name) first withmm_read_graph/mm_open_nodes. For everyadd_*tool: required fields must be given; a field with an enum) forces you to pick one option; a **relationship) field links to another node and makes the edge for free.
mm_read_graph β see what already exists.mm_add_*/mm_update_*/mm_add_metadata β store new or changed facts. Reuse names; do not duplicate.mm_add_edges, or give a relationship) in an add_*) to connect related nodes.mm_search_nodes/mm_open_nodes) β confirm before you act.1) Add an NPC and give it a home (one call):
{ "name": "Mira", "race": "Human", "currentLocation": { "edgeType": "located_in", "value": "Riverport" } }
Call mm_add_npc) with this. MemoryMesh creates the node and its located_in) edge to Riverport automatically.
2) Add a fact about someone who already exists:
{ "metadata": [ { "nodeName": "Aragorn", "contents": ["Hunting the Warg king", "As of Chapter 3"] } ] }
Call mm_add_metadata) with this.
3) Find something, then open it:
Call mm_search_nodes) with { "query": "sword" }, then mm_open_nodes) with { "names": ["AndΓΊril"] }.
mm_read_graph) first, then add what changed (new events, renamed enemies, moved items). Use "As of Chapter β¦" in metadata) to keep the timeline clear.allied_with/enemy_of, and set weight) (0β1) for how strong each bond is.mm_read_graph + mm_search_nodes) to see the real state, then mm_update_*/mm_delete_*) to correct it.metadata.memory.jsonπ¦ Every tool name starts with
mm_. "Add an NPC" =mm_add_npc. "Read the graph" =mm_read_graph. Always call themm_-prefixed names.
Each node has:
name β a unique name, e.g. Aragorn.nodeType β the kind of thing (npc, location, artifact, β¦).metadata β a list of text facts about the node.weight (optional) β 0β1, how strong or reliable a link is.Each edge has:
from β the start node name.to β the end node name.edgeType β the kind of link (owns, located_in, enemy_of, β¦).Rules that matter most for a small model:
mm_read_graph first so you reuse existing names and avoid duplicates.name for the same thing every time.mm_update_* replaces the old value. To keep old info, put it in metadata) or make a new node.metadata) for truth. Add "Source: β¦", "Reliability: High/Low", and "As of Chapter β¦" so you know whose word something is and when it was true.mm_delete_*) is final. Nodes do not come back. Only delete when you are sure.relationship) makes a link for free. When an add_* tool has a required relationship) field, MemoryMesh creates the node and its edge in one call.Each entity tool's exact fields, required fields, enums, and
relationship) shape come from that entity's.schema.json. The examples below show the typical shape.
Each tool does one job. Use the mm_) names.
mm_read_graph β return the whole graph as JSON. Args: none.mm_search_nodes β find nodes by text. Args: { "query": "sword" }.mm_open_nodes β get full details of some nodes. Args: { "names": ["Aragorn"] }.mm_add_nodes β add one or more nodes. Args: { "nodes": [ { "name", "nodeType", "metadata": ["β¦"] } ] }.mm_update_nodes β change existing nodes (same shape as add).mm_delete_nodes β remove nodes by name.mm_add_edges β add links. Args: { "edges": [ { "from", "to", "edgeType" } ] }.mm_update_edges β change existing edges (same shape as add).mm_delete_edges β remove edges.mm_add_metadata β add facts to a node. Args: { "metadata": [ { "nodeName", "contents": ["β¦"] } ] }.mm_delete_metadata β remove facts from a node.mm_add_npc β create an NPC. Args: { "name", "race" (pick from enum), "currentLocation" (a relationship) }.mm_update_npc β change an existing NPC (same fields as add).mm_delete_npc β remove an NPC.mm_add_player_character / mm_update_player_character / mm_delete_player_charactermm_add_location / mm_update_location / mm_delete_locationmm_add_artifact / mm_update_artifact / mm_delete_artifactmm_add_faction / mm_update_faction / mm_delete_factionmm_add_inventory / mm_update_inventory / mm_delete_inventorymm_add_currency / mm_update_currency / mm_delete_currencymm_add_quest / mm_update_quest / mm_delete_questmm_add_skills / mm_update_skills / mm_delete_skillsmm_add_temporal / mm_update_temporal / mm_delete_temporalmm_add_transportation / mm_update_transportation / mm_delete_transportationEach group has add (create), update (change β same fields as add), and delete (remove). Find the exact
name) first withmm_read_graph/mm_open_nodes. For everyadd_*tool: required fields must be given; a field with an enum) forces you to pick one option; a **relationship) field links to another node and makes the edge for free.
mm_read_graph β see what already exists.mm_add_*/mm_update_*/mm_add_metadata β store new or changed facts. Reuse names; do not duplicate.mm_add_edges, or give a relationship) in an add_*) to connect related nodes.mm_search_nodes/mm_open_nodes) β confirm before you act.1) Add an NPC and give it a home (one call):
{ "name": "Mira", "race": "Human", "currentLocation": { "edgeType": "located_in", "value": "Riverport" } }
Call mm_add_npc) with this. MemoryMesh creates the node and its located_in) edge to Riverport automatically.
2) Add a fact about someone who already exists:
{ "metadata": [ { "nodeName": "Aragorn", "contents": ["Hunting the Warg king", "As of Chapter 3"] } ] }
Call mm_add_metadata) with this.
3) Find something, then open it:
Call mm_search_nodes) with { "query": "sword" }, then mm_open_nodes) with { "names": ["AndΓΊril"] }.
mm_read_graph) first, then add what changed (new events, renamed enemies, moved items). Use "As of Chapter β¦" in metadata) to keep the timeline clear.allied_with/enemy_of, and set weight) (0β1) for how strong each bond is.mm_read_graph + mm_search_nodes) to see the real state, then mm_update_*/mm_delete_*) to correct it.metadata.