Skip to main content
Glama

add_metadata

Enhance knowledge graph nodes by adding metadata arrays, enabling enriched data organization and retrieval on the MemoryMesh MCP server.

Instructions

Add new metadata to existing nodes in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metadataYesArray of metadata to add

Implementation Reference

  • Executes the 'add_metadata' tool logic by invoking the knowledge graph manager's addMetadata method and formatting the successful response.
    case "add_metadata":
        const addResult = await this.knowledgeGraphManager.addMetadata(args.metadata);
        return formatToolResponse({
            data: {metadata: addResult},
            actionTaken: "Added metadata to nodes"
        });
  • Defines the input schema for validating arguments to the 'add_metadata' tool, expecting an array of metadata objects with nodeName and contents.
    inputSchema: {
        type: "object",
        properties: {
            metadata: {
                type: "array",
                description: "Array of metadata to add",
                items: {
                    type: "object",
                    description: "Metadata to add",
                    properties: {
                        nodeName: {type: "string", description: "The name of the node to add the metadata to"},
                        contents: {
                            type: "array",
                            items: {type: "string", description: "Metadata content item"},
                            description: "An array of metadata contents to add"
                        },
                    },
                    required: ["nodeName", "contents"],
                },
            },
        },
        required: ["metadata"],
    },
  • Registers the 'add_metadata' tool in the metadataTools array, including name, description, and input schema.
    {
        name: "add_metadata",
        description: "Add new metadata to existing nodes in the knowledge graph",
        inputSchema: {
            type: "object",
            properties: {
                metadata: {
                    type: "array",
                    description: "Array of metadata to add",
                    items: {
                        type: "object",
                        description: "Metadata to add",
                        properties: {
                            nodeName: {type: "string", description: "The name of the node to add the metadata to"},
                            contents: {
                                type: "array",
                                items: {type: "string", description: "Metadata content item"},
                                description: "An array of metadata contents to add"
                            },
                        },
                        required: ["nodeName", "contents"],
                    },
                },
            },
            required: ["metadata"],
        },
    },
  • Registers the handler mapping for 'add_metadata' tool by matching the tool name pattern to MetadataToolHandler.
    if (toolName.match(/^(add|delete)_metadata$/)) {
        return this.metadataHandler;
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 adds metadata to existing nodes, implying a mutation operation, but doesn't cover critical aspects like permissions required, whether changes are reversible, rate limits, error handling (e.g., if a node doesn't exist), or the response format. This is a significant gap for a mutation tool.

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 that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse 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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., side effects, error conditions), usage context relative to siblings, and expected outcomes. Given the complexity of modifying a knowledge graph, this leaves the agent under-informed.

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 schema description coverage is 100%, with the single parameter 'metadata' fully documented in the input schema. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't explain metadata format, constraints, or examples). Baseline 3 is appropriate as 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 new metadata') and target ('existing nodes in the knowledge graph'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'update_nodes' or 'delete_metadata', which could also involve metadata operations, leaving some ambiguity about its unique role.

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. It doesn't mention prerequisites (e.g., nodes must exist), exclusions (e.g., cannot add metadata to non-existent nodes), or comparisons to siblings like 'update_nodes' or 'delete_metadata', leaving 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/CheMiguel23/MemoryMesh'

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