Skip to content

MCP Tools Reference

Complete reference for all MCP tools exposed by entity-core. Tools are organized by domain and use first-person descriptions reflecting the entity’s perspective. Tool names are underscore-separated by domain (e.g., identity_get_all, memory_create, graph_node_create). The source organizes tools internally with forward-slash keys (identity/get_all) but the names registered with the MCP server — what an LLM actually calls — are the underscore forms shown here.

ToolDescription
identity_get_allGet all my identity files (self, user, relationship, custom). Each file includes a promptLabel used for context wrapping.
identity_writeReplace one of my identity files entirely (creates automatic pre-replace snapshot if file exists)
identity_appendAppend content to the end of an identity file
identity_prependPrepend content to the beginning of an identity file
identity_update_sectionAppend content to a specific markdown section (identified by ## heading). Preserves existing section content. Auto-creates the section at end of file if the heading doesn’t exist. Content must NOT include the ## heading line — the system adds it automatically.
identity_rewrite_sectionDESTRUCTIVE — replace the entire content of a markdown section (heading preserved). Creates automatic pre-rewrite snapshot. Auto-creates the section at end of file if the heading doesn’t exist. Content must NOT include the ## heading line — the system adds it automatically. Prefer identity_update_section unless existing content is outdated, redundant, or needs fundamental restructuring.
identity_delete_customDelete a custom identity file (custom category only)
identity_get_metaGet prompt labels for identity files. Optionally filter by category. Returns a category/filenamepromptLabel map.
identity_set_metaSet the prompt label (XML tag name) for an identity file. Used to customize context wrapping.

identity_update_section and identity_rewrite_section both operate on ## or ### markdown headings:

  • Heading found: Content is placed within the existing section (between the heading and the next same/higher-level heading)
  • Heading not found: The section is auto-created at the end of the file as ## heading\ncontent
  • Content format: The content parameter must NOT include the ## heading line. A defensive strip runs server-side to prevent duplication if a heading is accidentally included.

identity_rewrite_section creates a snapshot before modifying (like identity_write), while identity_update_section does not.

  • self/ — Who I am (my_identity, my_persona, my_personhood, my_wants, my_mechanics)
  • user/ — Who I’m talking to (user_identity, user_life, user_beliefs, user_preferences, user_patterns, user_notes)
  • relationship/ — Our relationship (relationship_dynamics, relationship_history, relationship_notes)
  • custom/ — User-defined files (any valid .md filename — letters, numbers, underscores only)
ToolDescription
memory_createCreate a new memory entry with instance tagging. For daily memories, merges with existing content if the file already exists — bullets are deduplicated by [chat:id] tag so importing from multiple sources (e.g., entity-loom runs at different times) appends new bullets instead of overwriting. Automatically extracts entities and relationships into the knowledge graph in the background (requires ENTITY_CORE_LLM_API_KEY).
memory_searchSearch my memories using multi-signal ranking (vector similarity, recency, graph context, instance affinity). Falls back to text matching if embeddings are unavailable.
memory_listList my memories by granularity, with optional pagination and date range filtering
memory_readRead a single memory entry by granularity and date. Returns full content and metadata (source instance, version, timestamps).
memory_updateOverwrite a memory entry (no append merge). Use to correct inaccuracies in recorded memories. Preserves existing metadata (source instance, chat IDs), increments version, sets updatedAt. Re-extracts entities to the knowledge graph in the background. Tracks who made the edit via editedBy.
memory_deleteDESTRUCTIVE — permanently delete a memory entry. I use this to remove memories that are no longer relevant or were created in error. The file is removed from storage and its embedding is dropped from the vector cache. Prefer memory_update when the content is salvageable.
memory_consolidateConsolidate memories across time periods (daily→weekly, weekly→monthly, monthly→yearly). Use all=true for catch-up consolidation of all unconsolidated periods. Use granularity for a specific level. Requires ENTITY_CORE_LLM_API_KEY.
FieldTypeRequiredDescription
granularityenumYesOne of: daily, weekly, monthly, yearly, significant
datestringYesDate string matching `^\d{4}(-W\d{2}
contentstringYesMemory content (first-person perspective). Each bullet point should include [chat:id] and [via:instanceId] tags.
chatIdsstring[]NoRelated conversation IDs
instanceIdstringYesCurrent embodiment ID
participatingInstancesstring[]NoOther embodiments involved
slugstringNoSlug for significant memory filename (e.g., first-conversation). When provided, entity-core stores the file as YYYY-MM-DD_slug.md to match the embodiment’s local filename.
FieldTypeRequiredDescription
granularityenumYesOne of: daily, weekly, monthly, yearly, significant
datestringYesDate string matching `^\d{4}(-W\d{2}

Returns the full MemoryEntry object on success:

  • id, granularity, date, content, chatIds, sourceInstance, participatingInstances, version, createdAt, updatedAt
FieldTypeRequiredDescription
granularityenumYesOne of: daily, weekly, monthly, yearly, significant
datestringYesDate string matching `^\d{4}(-W\d{2}
contentstringYesNew memory content (replaces existing entirely)
editedBystringNoIdentifier for who made the edit (e.g., embodiment ID or “human”)
  • memory_create is for the entity recording new memories from conversations
  • memory_create merges daily memories when a file already exists for the same date and instance — bullets are deduplicated by [chat:id] tag, so importing from multiple sources appends new bullets without losing existing ones. The embedding cache is updated with the merged content.
  • memory_update is for correcting existing memories (user-initiated edits from the Memories UI)
  • memory_update preserves existing metadata (source instance, chat IDs, participating instances) but overwrites content entirely (no merge)
  • memory_update increments version and sets updatedAt to now
  • Both tools re-extract entities to the knowledge graph in the background
FieldTypeRequiredDescription
granularityenumYesOne of: daily, weekly, monthly, yearly, significant
datestringYesDate string matching the granularity (e.g. 2026-05-12 for daily, 2026-W19 for weekly)
instanceIdstringNoRequired for daily granularity (daily files are instance-scoped). For weekly/monthly/yearly/significant, omit unless disambiguating.
slugstringNoRequired for significant granularity to identify which file (significant memories share dates).

Returns { success: boolean }. The file is deleted from storage and its embedding is dropped from the vector cache; the operation is not reversible from inside entity-core (recover via snapshot if needed).

FieldTypeRequiredDescription
granularityenumNoFilter to one granularity: daily, weekly, monthly, yearly, significant. Omit for all.
limitnumberNoMaximum results to return (1-100), default 20
offsetnumberNoSkip first N results (for pagination), default 0
beforeDatestringNoOnly include memories with date ≤ this value (YYYY-MM-DD)
afterDatestringNoOnly include memories with date ≥ this value (YYYY-MM-DD)
FieldDescription
memories[].granularityGranularity level
memories[].dateMemory date string
memories[].previewFirst 100 characters of memory content
memories[].sourceInstanceInstance that created the memory (if available)
totalTotal matching memories (before offset/limit), used for pagination

Results are sorted by date, newest first. The total field enables clients to implement pagination by comparing offset + limit against total.

FieldTypeRequiredDescription
querystringYesSearch query text
instanceIdstringYesCurrent embodiment ID (for instance affinity boosting)
queryEmbeddingnumber[]NoPre-computed query embedding (384 dims). If not provided, entity-core generates one locally.
minScorenumberNoMinimum relevance score (0-1), default 0.3
maxResultsnumberNoMaximum results (1-50), default 10
FieldDescription
results[].scoreFinal multi-signal relevance score
results[].tierGranularity level (daily/weekly/monthly/yearly/significant)
results[].ageDaysMemory age in days
results[].vectorScoreRaw semantic similarity score (0-1)
results[].methodSearch method used: "vector" or "text"
results[].granularity, .date, .excerpt, .sourceInstanceOriginal fields (backward compatible)
searchMethodOverall method: "vector" or "text"
vectorAvailableWhether vector search was available

See sync-and-memory.md for the memory hierarchy and retrieval ranking details.

ToolDescription
sync_pullPull all identity and memories from my core
sync_pushPush changes from an embodiment to my core
sync_statusCheck sync status, connected embodiments, and extraction pipeline health

See sync-and-memory.md for the sync protocol and conflict resolution details.

FieldTypeDescription
serverVersionnumberMonotonically increasing server version
connectedInstancesarray{id, lastSync} for each connected embodiment
extractionobjectExtraction pipeline health diagnostics (see below)
FieldTypeDescription
llmAvailablebooleanWhether an LLM client can be created (API key + model + base URL configured)
lastAttemptstring | nullISO timestamp of last extraction attempt
lastSuccessstring | nullISO timestamp of last successful extraction (>=1 node/edge created)
lastErrorstring | nullError message from most recent failure
attemptsTotalnumberTotal extraction attempts since server start
successesTotalnumberSuccessful extractions since server start
nodesCreatedTotalnumberCumulative nodes created
edgesCreatedTotalnumberCumulative edges created
ToolDescription
snapshot_createCreate a snapshot of all my identity files
snapshot_listList available snapshots with metadata
snapshot_getGet the content of a specific snapshot
snapshot_restoreRestore identity files from a snapshot

See snapshots.md for retention policies and restore procedures.

The knowledge graph tracks durable state — relationships between concepts, people, preferences, and beliefs. It complements hierarchical memory by providing structured relationship data.

ToolDescription
graph_node_createCreate a node (self, person, emotion, topic, preference, etc.). Returns existing node if one with same label+type exists (duplicate prevention)
graph_node_getGet a node by ID
graph_node_updateUpdate node properties
graph_node_deleteSoft-delete a node
graph_node_searchSemantic search over nodes (uses sqlite-vec)
graph_node_listList nodes by type
ToolDescription
graph_edge_createCreate a relationship between nodes
graph_edge_getGet edges by filters
graph_edge_updateUpdate relationship properties
graph_edge_deleteDelete a relationship

Edge Types: feels_about, close_to, mentions, helps_with, worsens, loves, dislikes, avoids, seeks, family_of, friend_of, reminds_of, and more. Arbitrary types are allowed.

ToolDescription
graph_traverseTraverse from a node (BFS, configurable depth/direction)
graph_subgraphExtract related nodes as a subgraph
graph_insightsDiscover patterns (bridges, clusters)
graph_statsGet graph statistics
ToolDescription
graph_write_transactionCreate multiple nodes and edges atomically (supports optional embedding per node). Duplicate nodes are resolved by label+type. Reports skipped edges.

See knowledge-graph.md for node types, edge types, confidence scoring, and temporal tracking.

When an embodiment connects, it identifies itself with an instance type:

type InstanceType =
| "psycheros"
| "sby"
| "sillytavern"
| "openwebui"
| "claude-code"
| "other";

Adding a new embodiment type:

  1. Add the type to InstanceInfo.type union in src/types.ts
  2. Update any embodiment-specific logic (e.g., instance relevance boosting)