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
| Name | Required | Description | Default |
|---|---|---|---|
| names | Yes | An 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'], }, },
- src/KnowledgeGraphManager.ts:708-728 (helper)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, }; }