diff --git a/src/memory/README.md b/src/memory/README.md index 5b131ff6c8..6075feb0f9 100644 --- a/src/memory/README.md +++ b/src/memory/README.md @@ -276,6 +276,8 @@ Docker: docker build -t mcp/memory -f src/memory/Dockerfile . ``` +For Awareness: a prior mcp/memory volume contains an index.js file that could be overwritten by the new container. If you are using a docker volume for storage, delete the old docker volume's `index.js` file before starting the new container. + ## License This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. diff --git a/src/memory/index.ts b/src/memory/index.ts index b7993a3a08..4590a1db6f 100644 --- a/src/memory/index.ts +++ b/src/memory/index.ts @@ -376,6 +376,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; + if (name === "read_graph") { + return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(), null, 2) }] }; + } + if (!args) { throw new Error(`No arguments provided for tool: ${name}`); } @@ -396,8 +400,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { case "delete_relations": await knowledgeGraphManager.deleteRelations(args.relations as Relation[]); return { content: [{ type: "text", text: "Relations deleted successfully" }] }; - case "read_graph": - return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(), null, 2) }] }; case "search_nodes": return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.searchNodes(args.query as string), null, 2) }] }; case "open_nodes":