Skip to main content
Glama

Memory Stats

memory_stats

Retrieve aggregate memory statistics—total memories, namespace/type breakdowns, top entities, and pinned counts—to monitor and analyze stored memory.

Instructions

Returns aggregate stats: total memories, breakdown by namespace/type, top entities, pinned count.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and 'Returns' implies a non-mutating read, which is the key trait. However, it says nothing about permission requirements, whether stats are global or scoped to the caller, cost/latency for a full aggregation, or whether results are cached.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact sentence, front-loaded with the verb and the returned fields. No filler, though the colon-list style leaves the scoping question unanswered rather than addressing it.

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?

There is no output schema, so the description must convey return values — it does so at a summary level, naming each field group. It stops short of describing the shape of the breakdown/top-entities data and the user scoping, which is the main gap for a stats tool.

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

Parameters2/5

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

Schema description coverage is 0% and the single parameter (user_id, optional) is never mentioned in the description. It is ambiguous whether 'total memories' is a global count or scoped to the supplied user_id, which is exactly the meaning the description should supply.

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 gives a specific verb ('Returns') plus the resource ('aggregate stats') and enumerates the contents: totals, namespace/type breakdown, top entities, pinned count. That enumeration distinguishes it from memory_list or memory_search, which return records rather than aggregates, though it never names a sibling explicitly.

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?

There is no when-to-use guidance, no mention of when a per-record listing tool would be preferable, and no preconditions. The agent must infer that this is a summarization/overview call from the word 'aggregate' alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.