Skip to main content
Glama
YuNaga224
by YuNaga224

open_nodes

Open specific nodes in a knowledge graph by name to retrieve stored AI memories as Markdown files for visualization in Obsidian's graph view.

Instructions

Open specific nodes in the knowledge graph by their names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesAn array of entity names to retrieve

Implementation Reference

  • The core implementation of the open_nodes tool. Loads the full knowledge graph, filters entities by the provided names, filters relations to only those between the selected entities, and returns the subgraph.
    async openNodes(names: string[]): Promise<KnowledgeGraph> { const graph = await this.loadGraph(); // Filter entities const filteredEntities = graph.entities.filter(e => names.includes(e.name)); // Get filtered entity names const filteredEntityNames = new Set(filteredEntities.map(e => e.name)); // Filter relations const filteredRelations = graph.relations.filter(r => filteredEntityNames.has(r.from) && filteredEntityNames.has(r.to) ); return { entities: filteredEntities, relations: filteredRelations }; }
  • The input schema and metadata for the open_nodes tool, defining it accepts an array of entity names.
    { name: "open_nodes", description: "Open specific nodes in the knowledge graph by their names", inputSchema: { type: "object", properties: { names: { type: "array", items: { type: "string" }, description: "An array of entity names to retrieve", }, }, required: ["names"], }, },
  • index.ts:230-231 (registration)
    The registration and dispatch handler in the MCP tool call switch statement, which invokes the storageManager.openNodes method with the provided arguments and formats the response.
    case "open_nodes": return { content: [{ type: "text", text: JSON.stringify(await storageManager.openNodes(args.names as string[]), null, 2) }] };

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/YuNaga224/obsidian-memory-mcp'

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