read_graph
Retrieve the complete knowledge graph memory system from Memento MCP to access structured data with semantic search and temporal awareness capabilities.
Instructions
Read the entire Memento MCP knowledge graph memory system
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| random_string | No | Dummy parameter for no-parameter tools |
Implementation Reference
- The main handler function for the 'read_graph' tool. It calls knowledgeGraphManager.readGraph() and returns the result as JSON-formatted text content.export async function handleReadGraph( args: Record<string, unknown>, // eslint-disable-next-line @typescript-eslint/no-explicit-any knowledgeGraphManager: any ): Promise<{ content: Array<{ type: string; text: string }> }> { const result = await knowledgeGraphManager.readGraph(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- The input schema and metadata definition for the 'read_graph' tool, including a dummy parameter since it takes no real inputs.{ name: 'read_graph', description: 'Read the entire Memento MCP knowledge graph memory system', inputSchema: { type: 'object', properties: { random_string: { type: 'string', description: 'Dummy parameter for no-parameter tools', }, }, }, },
- src/server/handlers/callToolHandler.ts:41-42 (registration)Dispatch/registration of the 'read_graph' tool in the main callToolHandler switch statement, delegating to the specific handler.case 'read_graph': return await toolHandlers.handleReadGraph(args, knowledgeGraphManager);
- src/server/handlers/toolHandlers/index.ts:4-4 (registration)Re-export of the handleReadGraph function from the tool handlers index, making it available for import in callToolHandler.export { handleReadGraph } from './readGraph.js';
- src/KnowledgeGraphManager.ts:892-894 (helper)The core readGraph method on KnowledgeGraphManager, which loads and returns the entire knowledge graph from storage.async readGraph(): Promise<KnowledgeGraph> { return this.loadGraph(); }