Skip to main content
Glama
knowall-ai

Neo4j Agent Memory MCP Server

by knowall-ai

list_memory_labels

Retrieve all unique memory labels with their counts to understand the structure and content of your Neo4j knowledge graph.

Instructions

List all unique memory labels currently in use with their counts (useful for getting an overview of the knowledge graph)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes a Neo4j query to retrieve all unique memory labels with their counts and total number of memories, returning the result as JSON.
    case 'list_memory_labels': { if (!isListMemoryLabelsArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid list_memory_labels arguments'); } const query = ` MATCH (memory) WITH labels(memory) as nodeLabels UNWIND nodeLabels as label WITH label, count(*) as count ORDER BY count DESC, label RETURN collect({label: label, count: count}) as labels, sum(count) as totalMemories `; const result = await neo4j.executeQuery(query, {}); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • TypeScript interface defining the arguments for the list_memory_labels tool (empty object).
    export interface ListMemoryLabelsArgs { // No arguments needed for this tool }
  • Type guard function to validate arguments for list_memory_labels tool.
    export function isListMemoryLabelsArgs(args: unknown): args is ListMemoryLabelsArgs { // This tool doesn't require any arguments, so just check it's an object return typeof args === 'object' && args !== null; }
  • MCP tool registration defining the name, description, and input schema (no required properties).
    { name: 'list_memory_labels', description: 'List all unique memory labels currently in use with their counts (useful for getting an overview of the knowledge graph)', inputSchema: { type: 'object', properties: {}, required: [], }, },

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/knowall-ai/mcp-neo4j-agent-memory'

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