Skip to content

MCP Tools Reference

Detailed parameter schemas for all 29 MCP tools.

Palace — Read Tools

mempalace_status

Palace overview: total drawers, wing and room counts, AAAK spec, and memory protocol.

Parameters: None

Returns: { total_drawers, wings, rooms, protocol, aaak_dialect }


mempalace_list_wings

List all wings with drawer counts.

Parameters: None

Returns: { wings: { "wing_name": count } }


mempalace_list_rooms

List rooms within a wing (or all rooms if no wing given).

ParameterTypeRequiredDescription
wingstringNoWing to list rooms for

Returns: { wing, rooms: { "room_name": count } }


mempalace_get_taxonomy

Full wing → room → drawer count tree.

Parameters: None

Returns: { taxonomy: { "wing": { "room": count } } }


Semantic search. Returns verbatim drawer content with similarity scores.

ParameterTypeRequiredDescription
querystringYesWhat to search for
limitintegerNoMax results (default: 5)
wingstringNoFilter by wing
roomstringNoFilter by room

Returns: { query, filters, results: [{ text, wing, room, source_file, similarity }] }


mempalace_check_duplicate

Check if content already exists in the palace before filing.

ParameterTypeRequiredDescription
contentstringYesContent to check
thresholdnumberNoSimilarity threshold 0–1 (default: 0.85–0.87)

Returns: { is_duplicate, matches: [{ id, wing, room, similarity, content }] }


mempalace_get_aaak_spec

Returns the AAAK dialect specification.

Parameters: None

Returns: { aaak_spec: "..." }


Palace — Write Tools

mempalace_add_drawer

File verbatim content into the palace. Identical content (same deterministic drawer ID) is silently skipped. For similarity-based duplicate detection before filing, use mempalace_check_duplicate.

ParameterTypeRequiredDescription
wingstringYesWing (project name)
roomstringYesRoom (aspect: backend, decisions, etc.)
contentstringYesVerbatim content to store
source_filestringNoWhere this came from
added_bystringNoWho is filing (default: "mcp")

Returns: { success, drawer_id, wing, room }


mempalace_delete_drawer

Delete a drawer by ID. Irreversible.

ParameterTypeRequiredDescription
drawer_idstringYesID of the drawer to delete

Returns: { success, drawer_id }


mempalace_get_drawer

Fetch a single drawer by ID — returns full content and metadata.

ParameterTypeRequiredDescription
drawer_idstringYesID of the drawer to fetch

Returns: { drawer_id, content, wing, room, metadata } where metadata.source_file, when present, is the basename only — the absolute path written by the miners is reduced before the dict is returned to MCP clients.


mempalace_list_drawers

List drawers with pagination. Optional wing/room filter. Returns IDs, wings, rooms, and content previews.

ParameterTypeRequiredDescription
wingstringNoFilter by wing
roomstringNoFilter by room
limitintegerNoMax results per page (default 20, max 100)
offsetintegerNoOffset for pagination (default 0)

Returns: { drawers: [...], total, limit, offset }


mempalace_update_drawer

Update an existing drawer's content and/or metadata (wing, room). Fetches the existing drawer first; returns an error if not found.

ParameterTypeRequiredDescription
drawer_idstringYesID of the drawer to update
contentstringNoNew content (omit to keep existing)
wingstringNoNew wing (omit to keep existing)
roomstringNoNew room (omit to keep existing)

Returns: { success, drawer_id, updated_fields }


Knowledge Graph Tools

mempalace_kg_query

Query entity relationships with time filtering.

ParameterTypeRequiredDescription
entitystringYesEntity to query (e.g. "Max", "MyProject")
as_ofstringNoDate filter — only facts valid at this date (YYYY-MM-DD)
directionstringNooutgoing, incoming, or both (default: both)

Returns: { entity, as_of, facts: [{ direction, subject, predicate, object, valid_from, valid_to, current }], count }


mempalace_kg_add

Add a fact to the knowledge graph.

ParameterTypeRequiredDescription
subjectstringYesThe entity doing/being something
predicatestringYesRelationship type (e.g. "loves", "works_on")
objectstringYesThe entity being connected to
valid_fromstringNoWhen this became true (YYYY-MM-DD)
source_closetstringNoCloset ID where this fact appears

Returns: { success, triple_id, fact }


mempalace_kg_invalidate

Mark a fact as no longer true.

ParameterTypeRequiredDescription
subjectstringYesEntity
predicatestringYesRelationship
objectstringYesConnected entity
endedstringNoWhen it stopped being true (default: today)

Returns: { success, fact, ended }


mempalace_kg_timeline

Chronological timeline of facts.

ParameterTypeRequiredDescription
entitystringNoEntity to get timeline for (omit for full timeline)

Returns: { entity, timeline: [{ subject, predicate, object, valid_from, valid_to, current }], count }


mempalace_kg_stats

Knowledge graph overview.

Parameters: None

Returns: { entities, triples, current_facts, expired_facts, relationship_types }


mempalace_traverse

Walk the palace graph from a room. Find connected ideas across wings.

ParameterTypeRequiredDescription
start_roomstringYesRoom to start from
max_hopsintegerNoHow many connections to follow (default: 2)

Returns: [{ room, wings, halls, count, hop, connected_via }]


mempalace_find_tunnels

Find rooms that bridge two wings.

ParameterTypeRequiredDescription
wing_astringNoFirst wing
wing_bstringNoSecond wing

Returns: [{ room, wings, halls, count, recent }]


mempalace_graph_stats

Palace graph overview: nodes, tunnels, edges, connectivity.

Parameters: None

Returns: { total_rooms, tunnel_rooms, total_edges, rooms_per_wing, top_tunnels }


mempalace_create_tunnel

Create a cross-wing tunnel linking two palace locations. Use when content in one project relates to another — e.g., an API design in project_api connects to a database schema in project_database.

ParameterTypeRequiredDescription
source_wingstringYesWing of the source
source_roomstringYesRoom in the source wing
target_wingstringYesWing of the target
target_roomstringYesRoom in the target wing
labelstringNoDescription of the connection
source_drawer_idstringNoSpecific source drawer ID
target_drawer_idstringNoSpecific target drawer ID

Returns: { success, tunnel_id, source, target }


mempalace_list_tunnels

List all explicit cross-wing tunnels. Optionally filter by wing.

ParameterTypeRequiredDescription
wingstringNoFilter tunnels by wing (source or target)

Returns: { tunnels: [...], count }


mempalace_delete_tunnel

Delete an explicit tunnel by its ID.

ParameterTypeRequiredDescription
tunnel_idstringYesTunnel ID to delete

Returns: { success, tunnel_id }


mempalace_follow_tunnels

Follow tunnels from a room to see what it connects to in other wings. Returns connected rooms with drawer previews.

ParameterTypeRequiredDescription
wingstringYesWing to start from
roomstringYesRoom to follow tunnels from

Returns: [{ wing, room, label, previews }]


Agent Diary Tools

mempalace_diary_write

Write to your personal agent diary.

ParameterTypeRequiredDescription
agent_namestringYesYour name — each agent gets its own wing
entrystringYesDiary entry (in AAAK format recommended)
topicstringNoTopic tag (default: "general")

Returns: { success, entry_id, agent, topic, timestamp }


mempalace_diary_read

Read recent diary entries.

ParameterTypeRequiredDescription
agent_namestringYesYour name
last_nintegerNoNumber of recent entries (default: 10)

Returns: { agent, entries: [{ date, timestamp, topic, content }], total, showing }


System Tools

mempalace_hook_settings

Get or set auto-save hook behaviour. silent_save=true saves directly without MCP-level clutter; silent_save=false uses the legacy blocking path. desktop_toast=true surfaces a desktop notification when a save completes. Call with no arguments to view the current settings.

ParameterTypeRequiredDescription
silent_savebooleanNotrue = silent direct save, false = blocking MCP calls
desktop_toastbooleanNotrue = show desktop toast via notify-send

Returns: { silent_save, desktop_toast }


mempalace_memories_filed_away

Check whether a recent palace checkpoint was saved. Returns message count and timestamp of the last save.

Parameters: None

Returns: { filed, message_count, timestamp }


mempalace_reconnect

Force a reconnect to the palace database. Use this after external scripts or CLI commands modified the palace directly, which can leave the in-memory HNSW index stale.

Parameters: None

Returns: { success, message, drawers, vector_disabled[, vector_disabled_reason] } (on no-palace: { success: false, message, drawers, vector_disabled }; on exception: { success: false, error })

Released under the MIT License.