Skip to main content
Glama

read_graph

Access the complete knowledge graph memory system of Memento MCP to retrieve structured data with semantic search, temporal awareness, and relation management 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 handleReadGraph function that executes the 'read_graph' tool logic by calling knowledgeGraphManager.readGraph() and formatting the result as a JSON text response.
    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 schema definition and registration of the 'read_graph' tool in the listToolsHandler, including name, description, and input schema with a dummy parameter.
    { 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', }, }, }, },
  • The dispatch case in handleCallToolRequest that registers and routes calls to the 'read_graph' handler.
    case 'read_graph': return await toolHandlers.handleReadGraph(args, knowledgeGraphManager);
  • The readGraph method in KnowledgeGraphManager, which loads and returns the entire knowledge graph (alias for loadGraph).
    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