Skip to main content
Glama
StevenWangler

MCP Memory Server

open_nodes

Extract specific entities from a knowledge graph by providing their names, enabling targeted retrieval for LLM memory operations on the MCP Memory Server.

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 openNodes method in the KnowledgeGraphManager class implements the core logic for the 'open_nodes' tool. It loads the full graph, filters entities by the provided names, includes only relations between those entities, and returns the resulting 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;
    }
  • Input schema definition for the 'open_nodes' tool, specifying that it takes an object with a required 'names' property that is an array of strings.
    inputSchema: {
      type: "object",
      properties: {
        names: {
          type: "array",
          items: { type: "string" },
          description: "An array of entity names to retrieve",
        },
      },
      required: ["names"],
    },
  • src/index.ts:357-371 (registration)
    Registration of the 'open_nodes' tool in the ListToolsRequestSchema response. Includes the tool name, description, and input schema.
    {
      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"],
      },
    },
  • Dispatch handler in the CallToolRequestSchema that invokes the openNodes method with the provided arguments and formats the response as JSON.
    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 the full burden of behavioral disclosure. 'Open' implies a read operation, but the description doesn't specify what 'open' entails (e.g., retrieving node details, expanding in UI, or returning metadata), whether it's idempotent, has rate limits, or requires permissions. For a tool with no annotations, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for the tool's apparent simplicity. Every word earns its place without being overly terse.

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?

Given no annotations, no output schema, and a single parameter with good schema coverage, the description is incomplete. It doesn't explain what 'open' means operationally, what data is returned, or how it differs from sibling read tools. For a knowledge graph tool with multiple related siblings, more context is needed to guide effective use.

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%, with the single parameter 'names' well-documented in the schema as 'An array of entity names to retrieve'. The description adds minimal value beyond this, mentioning 'by their names' which echoes the schema. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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 target resource ('specific nodes in the knowledge graph by their names'), which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'read_graph' or 'search_nodes', which appear to be related read operations. The purpose is clear but lacks sibling differentiation.

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 sibling tools like 'read_graph' and 'search_nodes' available, there's no indication of whether this is for retrieving specific known nodes versus broader queries. No prerequisites, exclusions, or alternative recommendations are mentioned.

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

Related 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/StevenWangler/mcp-memory-server'

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