Skip to main content
Glama
itseasy21

Knowledge Graph Memory Server

open_nodes

Retrieve specific entities from a knowledge graph by name to access stored information across conversations, enabling persistent memory for AI interactions.

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 handler function in KnowledgeGraphManager that loads the graph, filters entities by the provided names, includes only relations between those entities, and returns the filtered subgraph.
    async openNodes(names: string[]): Promise<KnowledgeGraph> {
      const graph = await this.loadGraph();
    
      // Filter entities
      const filteredEntities = graph.entities.filter(e => names.includes(e.name));
    
      // Create a Set of filtered entity names for quick lookup
      const filteredEntityNames = new Set(filteredEntities.map(e => e.name));
    
      // Filter relations to only include those between filtered entities
      const filteredRelations = graph.relations.filter(r =>
        filteredEntityNames.has(r.from) && filteredEntityNames.has(r.to)
      );
    
      const filteredGraph: KnowledgeGraph = {
        entities: filteredEntities,
        relations: filteredRelations,
      };
    
      return filteredGraph;
    }
  • The tool schema definition including name, description, and input schema specifying 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:533-534 (registration)
    The switch case in the CallToolRequestSchema handler that dispatches the call to knowledgeGraphManager.openNodes.
    case "open_nodes":
      return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.openNodes(args.names as string[]), null, 2) }] };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Open' suggests some kind of retrieval or access operation, but it doesn't clarify what 'opening' entails - whether it's read-only, if it modifies state, what permissions are required, or what happens when nodes don't exist. The description is too vague about the actual behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point. There's no wasted verbiage, though it could potentially benefit from slightly more specificity given the lack of annotations and sibling tools that might overlap in functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and multiple sibling tools that might overlap in functionality, the description is inadequate. It doesn't explain what 'opening' nodes means, what the expected output looks like, or how this differs from similar tools like 'read_graph' or 'search_nodes'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'names' parameter as 'An array of entity names to retrieve.' The description adds minimal value by mentioning 'by their names' but doesn't provide additional context about naming conventions, format requirements, or what constitutes a valid entity name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Open') and resource ('specific nodes in the knowledge graph'), making the purpose understandable. However, it doesn't distinguish this tool from siblings like 'read_graph' or 'search_nodes' - it's unclear what 'open' means versus 'read' or 'search' in this context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'read_graph' and 'search_nodes' that might serve similar purposes, there's no indication of when 'open_nodes' is the appropriate choice versus these other tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/itseasy21/mcp-knowledge-graph'

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