Skip to main content
Glama

get_memory_health

Check memory system health statistics for AI systems to monitor data storage performance and continuity.

Instructions

Get overall statistics about memory system health

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The getMemoryHealth() method that retrieves memory health statistics from the database view
    async getMemoryHealth() {
      try {
        const health = await this.db
          .select()
          .from(schema.memoryHealth);
    
        return health;
      } catch (error) {
        console.error('Error getting memory health:', error);
        throw error;
      }
    }
  • Tool registration schema defining name, description, and input parameters for get_memory_health
    name: "get_memory_health",
    description: "Get overall statistics about memory system health",
    inputSchema: {
      type: "object",
      properties: {}
    }
  • Database view definition that aggregates memory health statistics by type (total memories, avg importance, avg access count, etc.)
    export const memoryHealth = pgView("memory_health", {	type: memoryType(),
    	// You can use { mode: "bigint" } if numbers are exceeding js number limitations
    	totalMemories: bigint("total_memories", { mode: "number" }),
    	avgImportance: doublePrecision("avg_importance"),
    	avgAccessCount: numeric("avg_access_count"),
    	// You can use { mode: "bigint" } if numbers are exceeding js number limitations
    	accessedLastDay: bigint("accessed_last_day", { mode: "number" }),
    	avgRelevance: doublePrecision("avg_relevance"),
    }).as(sql`SELECT type, count(*) AS total_memories, avg(importance) AS avg_importance, avg(access_count) AS avg_access_count, count(*) FILTER (WHERE last_accessed > (CURRENT_TIMESTAMP - '1 day'::interval)) AS accessed_last_day, avg(relevance_score) AS avg_relevance FROM memories GROUP BY type`);
  • mcp.js:199-205 (registration)
    MCP server tool listing registration for get_memory_health
      name: "get_memory_health",
      description: "Get overall statistics about memory system health",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • mcp.js:593-595 (registration)
    MCP request handler that routes get_memory_health calls to memoryManager.getMemoryHealth()
    case "get_memory_health":
      const health = await memoryManager.getMemoryHealth();
      return { content: [{ type: "text", text: JSON.stringify(health, null, 2) }] };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get overall statistics,' which implies a read-only operation, but doesn't specify permissions, rate limits, or what 'health' entails (e.g., metrics, status). For a tool with zero annotation coverage, this is insufficient, as it misses key behavioral details like response format or potential side effects.

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 any fluff. It is appropriately sized and front-loaded, with every word contributing to clarity. This exemplifies conciseness, 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.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, no annotations, and no output schema, the description is minimal but covers the basic purpose. However, it lacks details on what 'health' statistics include or the return format, which could be important for an agent. It's adequate as a starting point but incomplete for full contextual understanding without additional metadata.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter meaning, and it appropriately doesn't mention any. This meets the baseline for tools with no parameters, as it avoids unnecessary information.

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 verb ('Get') and resource ('overall statistics about memory system health'), making the purpose understandable. It doesn't specifically differentiate from sibling tools like 'get_memory' or 'get_memory_history', but the focus on 'overall statistics' and 'health' provides some distinction. This is above the vague level but falls short of explicit sibling differentiation.

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 sibling tools like 'get_memory', 'get_memory_history', and 'get_cluster_insights', there is no indication of context, prerequisites, or exclusions. This leaves the agent without usage direction, scoring low due to the lack of any implied or explicit guidelines.

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

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/randyandrade/agi-mcp-server'

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