Skip to main content
Glama

add_nodes

Expand knowledge graphs by adding multiple nodes with names, types, and associated metadata using this tool in the MemoryMesh MCP server.

Instructions

Add multiple new nodes in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYesArray of nodes to add

Implementation Reference

  • The core handler logic for the 'add_nodes' tool within the GraphToolHandler's handleTool method. It extracts nodes from args, calls knowledgeGraphManager.addNodes, and returns a formatted success response with the added nodes.
    case "add_nodes":
        const addedNodes = await this.knowledgeGraphManager.addNodes(args.nodes);
        return formatToolResponse({
            data: {nodes: addedNodes},
            actionTaken: "Added nodes to knowledge graph"
        });
  • The input schema definition and tool metadata (name, description) for the 'add_nodes' tool, exported as part of graphTools.
    {
        name: "add_nodes",
        description: "Add multiple new nodes in the knowledge graph",
        inputSchema: {
            type: "object",
            properties: {
                nodes: {
                    type: "array",
                    description: "Array of nodes to add",
                    items: {
                        type: "object",
                        description: "Node to add",
                        properties: {
                            name: {type: "string", description: "The name of the node"},
                            nodeType: {type: "string", description: "The type of the node"},
                            metadata: {
                                type: "array",
                                items: {type: "string", description: "Metadata item"},
                                description: "An array of metadata contents associated with the node"
                            },
                        },
                        required: ["name", "nodeType", "metadata"],
                    },
                },
            },
            required: ["nodes"],
        },
    },
  • Registration of the GraphToolHandler for graph manipulation tools including 'add_nodes' via regex matching in ToolHandlerFactory.getHandler.
    if (toolName.match(/^(add|update|delete)_(nodes|edges)$/)) {
        return this.graphHandler;
  • Registration of all static tools (including 'add_nodes') into the central tools Map during ToolsRegistry initialization.
    // Register static tools
    allStaticTools.forEach(tool => {
        this.tools.set(tool.name, tool);
    });
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. While 'Add multiple new nodes' implies a write/mutation operation, the description doesn't address important behavioral aspects like: what permissions are required, whether nodes must be unique, what happens on conflicts, whether the operation is atomic, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

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 extremely concise - a single sentence with zero wasted words. It's front-loaded with the core purpose and contains no unnecessary information. This is an excellent example of efficient communication.

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 mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address the behavioral aspects needed for safe use (permissions, error conditions, response format) or provide context about how this tool relates to the many specialized sibling tools. The 100% schema coverage helps with parameters, but other critical context is missing.

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 fully documents the single 'nodes' parameter and its nested structure. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain what constitutes a valid node, provide examples, or clarify the relationship between node properties. 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 ('Add multiple new nodes') and the resource ('in the knowledge graph'), which provides a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'add_artifact' or 'add_location' that also add specific types of entities to what appears to be the same knowledge graph system.

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 many sibling tools that add specific entity types (artifact, currency, location, etc.), there's no indication whether 'add_nodes' is a general-purpose tool for arbitrary nodes or whether it has specific use cases compared to the more specialized add_* 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

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/CheMiguel23/MemoryMesh'

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