Skip to main content
Glama
yodakeisuke

Knowledge Graph Memory Server

by yodakeisuke

open_nodes

Retrieve complete information from the knowledge graph by specifying entity names to access stored data including subdomains and metadata.

Instructions

Open specific nodes in the knowledge graph by their names. Returns the complete node information including subdomain and all metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesAn array of entity names to retrieve, returning full entity information including subdomain

Implementation Reference

  • The core handler function that implements the 'open_nodes' tool logic. It loads the knowledge graph, filters entities by the provided names, finds connecting relations, and returns the subgraph.
    async openNodes(names: string[]): Promise<KnowledgeGraph> { const graph = await this.loadGraph(); const filteredEntities = graph.entities.filter(e => names.includes(e.name)); const filteredEntityNames = new Set(filteredEntities.map(e => e.name)); const filteredRelations = graph.relations.filter(r => filteredEntityNames.has(r.from) && filteredEntityNames.has(r.to) ); return { entities: filteredEntities, relations: filteredRelations, }; }
  • index.ts:522-536 (registration)
    Registers the 'open_nodes' tool in the list of tools returned by ListToolsRequest, including its name, description, and input schema.
    { name: "open_nodes", description: "Open specific nodes in the knowledge graph by their names. Returns the complete node information including subdomain and all metadata.", inputSchema: { type: "object", properties: { names: { type: "array", items: { type: "string" }, description: "An array of entity names to retrieve, returning full entity information including subdomain", }, }, required: ["names"], }, },
  • Defines the input schema for the 'open_nodes' tool, specifying an object with a required 'names' array of strings.
    inputSchema: { type: "object", properties: { names: { type: "array", items: { type: "string" }, description: "An array of entity names to retrieve, returning full entity information including subdomain", }, }, required: ["names"], },
  • The dispatch case in the CallToolRequest handler that invokes the openNodes method on the knowledgeGraphManager instance.
    case "open_nodes": return createResponse(JSON.stringify(await knowledgeGraphManager.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/yodakeisuke/mcp-memory-domain-knowledge'

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