Skip to main content

Module tools

Module tools 

Source
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_id
  • memory_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?) -> Vec
  • memory_forget(palace, drawer_id) -> ()
  • palace_create(name, description?) -> PalaceId
  • palace_list() -> Vec
  • palace_info(palace) -> palace metadata + stats
  • kg_assert(palace, subject, predicate, object, confidence?, provenance?) -> ()
  • kg_query(palace, subject) -> Vec

Re-exports§

pub use bm25::spawn_bm25_index_worker;
pub use bm25::Bm25IndexRequest;
pub use bm25::BM25_INDEX_QUEUE_CAPACITY;
pub use definitions::tool_definitions;
pub use definitions::tool_definitions_with;
pub use definitions::MemoryMcpServer;

Modules§

bm25
BM25 lexical-lane helpers for the trusty-memory MCP tool surface.
definitions
MCP tools/list schema + server marker for trusty-memory.
helpers
Shared helpers for the trusty-memory MCP tool surface.
kg_ops
KG / alias / prompt-fact / upgrade tool handlers for the trusty-memory MCP surface.
memory_ops
Memory-tool handlers for the trusty-memory MCP surface.
palace_ops
Palace-tool handlers for the trusty-memory MCP surface.

Functions§

dispatch_tool
Dispatch a tool call by name to its real handler.