Expand description
MCP tool surface for trusty-memory.
Why: Concentrates the public tool contract in one file so changes are
auditable and the MCP schema stays in sync with the implementation.
What: Defines MemoryMcpServer, tool_definitions() (the MCP
tools/list payload), and the in-process tool dispatcher wired to the
real PalaceRegistry + retrieval / KG APIs.
Test: cargo test -p trusty-memory-mcp validates the schema and dispatch.
Tools exposed:
memory_remember(palace, text, room?, tags?)-> drawer_idmemory_recall(palace, query, top_k?)-> Vec(L0+L1+L2) memory_recall_deep(palace, query, top_k?)-> Vec(L3 deep) memory_list(palace, room?, tag?, limit?)-> Vecmemory_forget(palace, drawer_id)-> ()palace_create(name, description?)-> PalaceIdpalace_list()-> Vecpalace_info(palace)-> palace metadata + statskg_assert(palace, subject, predicate, object, confidence?, provenance?)-> ()kg_query(palace, subject)-> Vec
Structs§
- Memory
McpServer - Marker server type. Reserved for future stateful MCP server impls.
Functions§
- dispatch_
tool - Dispatch a tool call by name to its real handler.
- tool_
definitions - MCP
tools/listresponse payload. - tool_
definitions_ with - Variant of
tool_definitionsaware of whether a default palace is configured. Whenhas_defaultis true, thepalaceargument is moved out of therequiredlist for every tool that takes it.