Skip to main content
Glama
BRO3886

Memory Custom

by BRO3886

open_nodes

Retrieve specific entities from a knowledge graph by their names to access stored information and relationships.

Instructions

Open specific nodes in the knowledge graph by their names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesAn array of entity names to retrieve
memoryFilePathYesThe path to the memory file

Implementation Reference

  • Core implementation of the 'open_nodes' tool: loads the knowledge graph, filters to include only specified entity names and relations between them, returns the subgraph.
    async openNodes(names: string[], filepath: string): Promise<KnowledgeGraph> {
      await this.setMemoryFilePath(filepath);
      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;
    }
  • index.ts:559-578 (registration)
    Registers the 'open_nodes' tool in the ListTools response, including 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",
          },
          memoryFilePath: {
            type: "string",
            description: "The path to the memory file",
          },
        },
        required: ["names", "memoryFilePath"],
      },
    },
  • Dispatches CallToolRequest for 'open_nodes' by calling the openNodes method on KnowledgeGraphManager and serializing the result.
    case "open_nodes":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await knowledgeGraphManager.openNodes(
                args.names as string[],
                args.memoryFilePath as string
              ),
              null,
              2
            ),
          },
        ],
      };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'opens' nodes, which suggests a read operation, but doesn't clarify if this is a safe read, what permissions are needed, whether it modifies state, or what the output format might be. The description lacks critical behavioral context for a tool interacting with a knowledge graph.

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, clear sentence with zero wasted words. It's appropriately sized and front-loaded with the core purpose, making it easy to scan and understand quickly.

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 the complexity of a knowledge graph tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'opening' nodes entails (e.g., retrieving details, expanding views), what data is returned, or how it differs from sibling tools. For a tool with two required parameters and potential behavioral nuances, this is inadequate.

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 both parameters ('names' and 'memoryFilePath') adequately. The description adds no additional meaning beyond implying that 'names' refer to entity names in the knowledge graph, which is minimal value over the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'read_graph' or 'search_nodes', which might have overlapping functionality for accessing graph data.

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 like 'read_graph' or 'search_nodes'. It mentions opening nodes 'by their names', which implies a prerequisite of knowing exact names, but doesn't explicitly state this or compare to other tools for different access patterns.

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/BRO3886/mcp-memory-custom'

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