read_graph
Retrieve the complete knowledge graph from Memory Custom's MCP server to access structured data stored in memory files.
Instructions
Read the entire knowledge graph
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memoryFilePath | Yes | The path to the memory file |
Implementation Reference
- index.ts:223-226 (handler)The core handler function in KnowledgeGraphManager that sets the memory file path and loads/returns the entire KnowledgeGraph from the file.async readGraph(filepath: string): Promise<KnowledgeGraph> { await this.setMemoryFilePath(filepath); return this.loadGraph(); }
- index.ts:527-539 (schema)The input schema and metadata for the read_graph tool, defined in the tools list returned by the ListTools handler.name: "read_graph", description: "Read the entire knowledge graph", inputSchema: { type: "object", properties: { memoryFilePath: { type: "string", description: "The path to the memory file", }, }, required: ["memoryFilePath"], }, },
- index.ts:677-691 (registration)The dispatch case in the CallToolRequest handler that registers and executes the read_graph tool by calling the handler function.case "read_graph": return { content: [ { type: "text", text: JSON.stringify( await knowledgeGraphManager.readGraph( args.memoryFilePath as string ), null, 2 ), }, ], };