Skip to main content
Glama

open_nodes

Retrieve specific entities from your Memento MCP knowledge graph memory by providing their names to access stored information.

Instructions

Open specific nodes in your Memento MCP knowledge graph memory by their names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesAn array of entity names to retrieve

Implementation Reference

  • MCP tool handler switch case that executes 'open_nodes' by invoking knowledgeGraphManager.openNodes with the provided names argument and returns the result as JSON text.
    case 'open_nodes': return { content: [ { type: 'text', text: JSON.stringify(await knowledgeGraphManager.openNodes(args.names), null, 2), }, ], };
  • Tool schema definition including name, description, and input schema requiring 'names' array of strings.
    { name: 'open_nodes', description: 'Open specific nodes in your Memento MCP knowledge graph memory by their names', inputSchema: { type: 'object', properties: { names: { type: 'array', items: { type: 'string' }, description: 'An array of entity names to retrieve', }, }, required: ['names'], }, },
  • Core helper method implementing openNodes logic by delegating to storageProvider or performing in-memory filtering of entities and their connected relations.
    async openNodes(names: string[]): Promise<KnowledgeGraph> { if (this.storageProvider) { return this.storageProvider.openNodes(names); } // Fallback to file-based implementation const graph = await this.loadGraph(); // Filter entities by name const filteredEntities = graph.entities.filter((e) => names.includes(e.name)); // Get relations connected to these entities const filteredRelations = graph.relations.filter( (r) => names.includes(r.from) || names.includes(r.to) ); return { entities: filteredEntities, relations: filteredRelations, }; }

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