Skip to content

Commit 4b6ce39

Browse files
authored
Merge pull request #1276 from ajoslin103/ajoslin/memory
calling [mcp/memory] read_graph without args
2 parents c5d2865 + c798393 commit 4b6ce39

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/memory/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ Docker:
276276
docker build -t mcp/memory -f src/memory/Dockerfile .
277277
```
278278

279+
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.
280+
279281
## License
280282

281283
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.

src/memory/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
376376
server.setRequestHandler(CallToolRequestSchema, async (request) => {
377377
const { name, arguments: args } = request.params;
378378

379+
if (name === "read_graph") {
380+
return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(), null, 2) }] };
381+
}
382+
379383
if (!args) {
380384
throw new Error(`No arguments provided for tool: ${name}`);
381385
}
@@ -396,8 +400,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
396400
case "delete_relations":
397401
await knowledgeGraphManager.deleteRelations(args.relations as Relation[]);
398402
return { content: [{ type: "text", text: "Relations deleted successfully" }] };
399-
case "read_graph":
400-
return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.readGraph(), null, 2) }] };
401403
case "search_nodes":
402404
return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.searchNodes(args.query as string), null, 2) }] };
403405
case "open_nodes":

0 commit comments

Comments
 (0)