Skip to main content
Glama

open_nodes

Retrieve specific entities from a knowledge graph by providing their names. Enhances structured thinking and problem-solving within AI workflows.

Instructions

Open specific nodes in the knowledge graph by their names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesArray of entity names to retrieve

Implementation Reference

  • The execute function for the 'open_nodes' tool. It retrieves entities from the knowledge graph using graph.getEntities(args.names), computes found and notFound lists, and returns a JSON string with entities, found names, notFound names, and a summary message.
    execute: async (args) => {
      const results = graph.getEntities(args.names);
      const found = results.map(entity => entity.name);
      const notFound = args.names.filter(name => !found.includes(name));
      
      // Return as string
      return JSON.stringify({
        entities: results,
        found,
        notFound: notFound.length > 0 ? notFound : null,
        message: `Found ${found.length} entities. ${notFound.length} entities not found.`
      });
    }
  • The server.addTool call that registers the 'open_nodes' tool within the registerMemoryTools function, including name, description, parameters schema, and inline execute handler.
    server.addTool({
      name: 'open_nodes',
      description: 'Open specific nodes in the knowledge graph by their names',
      parameters: Schemas.OpenNodesSchema,
      execute: async (args) => {
        const results = graph.getEntities(args.names);
        const found = results.map(entity => entity.name);
        const notFound = args.names.filter(name => !found.includes(name));
        
        // Return as string
        return JSON.stringify({
          entities: results,
          found,
          notFound: notFound.length > 0 ? notFound : null,
          message: `Found ${found.length} entities. ${notFound.length} entities not found.`
        });
      }
    });
  • Zod schema for 'open_nodes' tool input parameters: an array of strings representing entity names to retrieve from the knowledge graph.
    export const OpenNodesSchema = z.object({
      names: z.array(z.string().min(1)).describe('Array of entity names to retrieve')
    });
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 action ('open') but doesn't clarify what 'open' entails operationally—whether it retrieves node details, validates existence, or requires permissions. No information on rate limits, error handling, or output format is given, which is a significant gap for a tool with potential read/mutation implications.

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 front-loads the core action and resource, making it easy to parse. Every word contributes directly to understanding the tool's purpose without redundancy or fluff.

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 lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what 'opening' nodes returns, how errors are handled, or behavioral traits like idempotency. For a tool interacting with a knowledge graph, more context on operational semantics is needed to compensate for missing structured data.

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?

The description adds minimal semantic context beyond the input schema, which has 100% coverage. It implies that 'names' refers to entity names in the knowledge graph, but doesn't elaborate on format, uniqueness, or handling of invalid names. Since schema coverage is high, 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'), with the qualifier 'by their names' adding specificity. It distinguishes from siblings like 'search_nodes' (searching) and 'read_graph' (reading entire graph), though not explicitly. However, 'open' is somewhat ambiguous compared to more precise verbs like 'retrieve' or 'access'.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for retrieving nodes by exact names, but it doesn't specify prerequisites, exclusions, or compare to siblings like 'search_nodes' (for fuzzy matching) or 'read_graph' (for broader access). This leaves the agent to infer usage context.

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/flight505/mcp-think-tank'

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