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;

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