Skip to main content
Glama

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
NameRequiredDescriptionDefault
random_stringNoDummy 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', }, }, }, },
  • 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);
  • Re-export of the handleReadGraph function from the tool handlers index, making it available for import in callToolHandler.
    export { handleReadGraph } from './readGraph.js';
  • The core readGraph method on KnowledgeGraphManager, which loads and returns the entire knowledge graph from storage.
    async readGraph(): Promise<KnowledgeGraph> { return this.loadGraph(); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gannonh/memento-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server