5.20 The memory_stats tool

Aggregate statistics for the whole store: total / active / soft-deleted / expired counts, average importance, oldest and newest created_at, top tags by count, and counts per source_provider.

5.20.1 Inputs

None.

5.20.2 Output

{
  "ok": true,
  "total":         412,
  "active":        400,
  "soft_deleted":  10,
  "expired":       2,
  "avg_importance": 0.55,
  "oldest_created_at": "2025-11-01T00:00:00Z",
  "newest_created_at": "2026-05-25T12:00:00Z",
  "top_tags": [
    { "tag": "family",      "count": 87 },
    { "tag": "preferences", "count": 64 }
  ],
  "by_provider": [
    { "provider": "openai", "count": 200 },
    { "provider": "(none)", "count": 212 }
  ]
}

5.20.3 Errors

DATABASE_ERROR.